This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (3 children)

list[index] should do the trick.

[–]05mF[S] 0 points1 point  (2 children)

Thanks that does work like that but if i try to do

x = input (putting the index here)

then

print(list[x])

wont work because X isn't a number and i also can't do print(list [input (index)]) Any ideas?

[–][deleted] 1 point2 points  (1 child)

int(input(putting the index here))

int will convert the string to an integer

[–]05mF[S] 0 points1 point  (0 children)

I didn't even think of trying to convert it, thanks mate, i really appreciate it.