- 1
Program to print a word number of times it has value beside it
Eg-: xyz:4,abc:2 Program should print xyz xyz xyz xyz Abc abc
2 Respostas
+ 1
dat = {"xyz":4 ,"abc":2}
for x in dat:
print ((dat[x] + " ") * x)
Eg-: xyz:4,abc:2 Program should print xyz xyz xyz xyz Abc abc