7-2 sdut-字符之比较大小

知识点:

ASCII码和字符的转化
转为字符chr(a)
转为ASCII码ord(c))

代码:

num=[eval(x) for x in input().split()]
num.sort()
for i in num[:-1]:
    print(chr(i),end="<")
print(chr(num[-1]) )
posted @ 2022-05-25 22:11  kingwzun  阅读(59)  评论(0编辑  收藏  举报