Time:11-16
CodePudding user response:
print (adict) Adict is a new variable, empty
Quote: refer to 1st floor tianfang response: print (adict) Adict is a new variable, empty Dict1 plain fittings for it in the dictionary that line the list yuan
1, dict1={' 1 ': list1 [o], list1 [1]} this you should be to want to write a dictionary, dictionary format is the key: value mode is 1 to 1 you this much for you can like this: 1 dict1={' 1' : list1} 2, print (adict) adict is a variable, no assignment
Quote: refer to 4th floor qq_20375703 response: 1, dict1={' 1 ': list1 [o], list1 [1]} this you should be to want to write a dictionary, dictionary format is the key: value mode is 1 to 1 you this much for you can like this: 1 dict1={' 1' : list1} 2, print (adict) adict is a variable, no assignment There can be only one value cost? Wrong!
List1=[' 1 ', '2') List2=[' a ', 'b'] Dict1={' 1 ': [list1 [0], list1 [1]]}
Page link:https//www.codepudding.com/other/82371.html