d = {'a':8,'b':2,'c':3}
# 字典是无序的,直接对字典排序是不存在的
print(d.items())


#sort循环调用
res=sorted(d.items(),key=lambda x:x[1] )
print(res)

for k,v in res:
print(k,v)



n=[
[1, 2, 3, 4],
[1, 2, 3, 4],
[1, 2, 3, 4],
[1, 2, 3, 4],
[1, 2, 3, 4]

]

for a in n:#循环一个把整个LIST取出来了
print(a)

for a,b,c,d in n:
print(a,b,c,d)



def my(name:str):
print(name)
my('aa')










相关文章:

  • 2021-10-30
  • 2022-12-23
  • 2021-06-07
  • 2021-09-28
  • 2022-01-14
猜你喜欢
  • 2021-07-31
  • 2021-10-04
相关资源
相似解决方案