Log in to edit a copy.
Download.
Other published documents...
2015-10-28 Math3600 Dictionaries
2761 days ago by calkin
list1=['aaa','bbb','ccc']
dict1={} for j in list1: dict1.update({j:0})
show(dict1)
dict1['aaa']+=1
dict1
{'aaa': 1, 'bbb': 0, 'ccc': 0}
{'aaa': 1, 'bbb': 0, 'ccc': 0}
list2=[0,0,1]
str(list2)
'[0, 0, 1]'
'[0, 0, 1]'