Adding default value to the key if value list has less elements in python

后端 未结 0 838
无人共我
无人共我 2021-01-17 15:51
l1 = [1,2,3,4,5]
l2 = [\'a\',\'b\',\'c\']

res = zip(l1, l2)
print (res)

Above code is resulting - [(1, \'a\'), (2, \'b\'), (3, \'c\')]

相关标签:
回答
  • 消灭零回复
提交回复
热议问题