+ 1
why dictionary not working?in phython
i want to take input from user and on this input i want to print one number from dictionary but its not working https://code.sololearn.com/cBNFFV0IC0zq/?ref=app
1 Odpowiedź
+ 18
That's because you take 2 times input and the second was
hi[input()]
#input take as string
For solution you can make variable for input, like
inp = int(input())
And refer to inp variable
#if inp>28:
#print(hi[inp])