最新回答 / 笔风范
# -*- coding: utf-8 -*-# 加上上面这个注释就可以带有中文的注释了b = "Python"print("Life is short, you need {c}".format(c=b))print("Life is short, you need {0}".format("Python"))# no chinese world or
2024-01-11
最赞回答 / 笔风范
L = [75, 92, 59, 68, 99]def avg(l): return sum(l) / len(l)def avg2(l): sum1 = 0 for i in l: sum1 += i return sum1 / len(l)average = avg2(L)print(average)
2023-12-19
最新回答 / weixin_慕无忌2350060
if not isinstance(x,int) or not isinstance(x,float):这里应该用and,否则任何类型进去都是true
2023-12-12