0
How can I indexing out of the for loop
def char_level(): choose = int(input("Pick level in range 1-6 : ")) level = [1,2,3,4,5,6] for j in level: j*=10 print(j[0]) char_level()
2 Antworten
+ 1
Do level[0]. If you want to print it only once, put the statement out of the for loop.
+ 2
Now, j are [10,20,30,40,50,60]
I want to print out 10, how to do that?