0
d1 = { "go":"went","come":"Came","stars":"above the sky" ,"wat ":"drinkable","fire ": " hot"} a = input( "enter your word :")
print(d1[ ]) go and come is printing but wat and fire os not printing why
8 Respuestas
+ 2
d1 = { "go":"went","come":"Came","stars":"above the sky" ,"wat":"drinkable","fire": " hot"}
a = input( "enter your word :")
print(d1[a])
The error was coming because there was extra space in "fire" and "wat"
Now it works properly. Try the above code ...
+ 1
~ swim ~ actually he wants to print(d1[a])
+ 1
Yup looks like he wants to print d1[a] and the error was because of space in key