使用Python解决算法题用到的一些
a = int(n) # 转换成int类型
a = list(map(int,input().split())) # 输入数组为int类型
a.upper() # 大写
a.lower() # 小写
a.isalpha() # 判断是否为字母
#还有很多判断,如数字等等
print(out[i], end='') # print不换行
print('hello {:.2f} hei {:.3f}'.format(a,b)) # 小数的输出
n = ord('A') # A的ASCII码
c = chr
原创
2021-03-13 20:07:14 ·
194 阅读 ·
0 评论