we can’t loop over integers. That will give a TypeError.
Why would you want a loop?
Right…Thx!!!
Did that solve your problem?
because my_list
is type list:
print type(my_list)
while gold was of type integer:
print type(inventory['gold'])
loop works fine on string and list, just not on integer
got it. thank you so much