摘要: 一、比较与交换1.比较并输出大的 print(a if a>b else b) 2.交换两个元素 a,b = b,alist1[i],list[j]=list1[j],list[i] 二、排序 1.字符串排序 s = 'aaccbgd' print(''.join(sorted(list(s)))) 阅读全文
posted @ 2022-11-20 03:09 Mrwhite86 阅读(264) 评论(0) 推荐(0)