0
PROBLEM
I am not get full dict. Mohammad Umair: set1={1,2,3,4,5} list1=["one","two","three","four","five"] dict1={} i=0 for k in set1: dict1.update(k=list1[i]) i=i+1 print(dict1)
10 Answers
+ 6
Update changes the entry if it is in the dictionary so each call "k" is changed leaving just the last item.
+ 3
set1={1,2,3,4,5}
list1=["one","two","three","four","five"]
dict1={}
i=0
for k in set1:
dict1[k]=list1[i]
i=i+1
print(dict1)
+ 1
It works for me....
https://code.sololearn.com/cjDoEs2fRd8m/?ref=app
+ 1
what version of python do you have... can you print a simple hello world?
0
ifl it not give output
0
ifl it not give output
0
but in my laptop it not work...
0
thx
0
its work..
0
thx