最赞回答 / weixin_慕哥1338196
# Enter a codedef get_second(elem): return elem[1]L = [('Alice',89), ('Bob',72), ('Candy',88), ('David',79), ('Ellena',99)]L.sort(key=get_second,reverse=True)print(L)
2021-07-31
最赞回答 / 慕妹1054277
a= r'''"To be, or not to be ": that is the question.Whether it's nobler in the mind of suffer."'''print (a)其实用了raw就没有必要放 \ 了
2021-07-27
最新回答 / weixin_慕盖茨3126952
L = [75,92,59,68,99]he =0for ch in L: he=ch+he print(he)print(he/5)
2021-07-25
最赞回答 / Hmily_暖心向阳
以我目前自学到的知识,Python对普通字符串使用双引号或者单引号没有确定要求,除非字符中本身包含引号,则需要包含单引号时变量用双引号,包含双引号时变量用单引号,或者使用转义符~
2021-07-21