How do I read 1 value from a list
LukeShomper (43)

Can Pop(0) be used or something like Getting 1 value from a list
or should I use something like
Tea = ["Bob", "Ross", "Has", "Tea"]
And like print(FromTeaGet(0))
And then the console would say
Bob
And if I did print(FromTeaGet(1))
The console would say
Ross
I have googled it and am still confuused

You are viewing a single comment. View All
Answered by mwilki7 (867) [earned 5 cycles]
View Answer
mwilki7 (867)

Say you want to show everything inside the mage list (make sure the spelling/capitalization is correct):

for item in Mage:
    print(item)

Or using a for range loop

for i in range(0, len(Mage)):
    print(Mage[i])

Or maybe you just want to get something from a certain index:

myHP = Mage[0]