【Python Practice】Day 23 Question 95-99

'''
@Author: your name
@Date: 2020-07-29 09:21:12
@LastEditTime: 2020-07-29 10:06:38
@LastEditors: Please set LastEditors
@Description: In User Settings Edit
@FilePath: \vscode_py\day23.py
'''

# Question 95
# 找到第二大的数
def Q95():
    li=map(int,input().split(" "))              # str转为int
    # print(li)
    s=list(set(li))
    print(s)
    s.sort()
    print(s[-2])



# Question 96
# 使用wrap切割字符串
import textwrap
def wrap(string,maxwidth):
    string=textwrap.wrap(string,maxwidth)
    string='\n'.join(string)
    return string

# Question 97
# 打印对应的图形


# Question 98
# You are given a date. Your task is to find what the day is on that date.
# Use weekday function of calender module
import calendar
def Q98():
    month,day,year=map(int,input().split())
    dayId=calendar.weekday(year,month,day)
    print(calendar.day_name[dayId].upper())

# Question 99
# 打印两组数的差异
def Q99():
    n=int(input())
    set1=set(map(int,input().split()))
    print("set1:{}".format(set1))

    m=int(input())
    set2=set(map(int,input().split()))
    print("set2:{}".format(set2))

    ans=list(set1^set2)
    ans.sort()
    for i in ans:
        print(i)



if __name__ == "__main__":
    # Q95()

    # string,width=input(),int(input())
    # result=wrap(string,width)
    # print(result)

    # Q98()

    Q99()
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Tech沉思录

点赞加投币,感谢您的资瓷~

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值