How would I write 3 for loops in the same code?
Fine for one loop, but how do I get 2 more in there? I've tried this:
Doesn't work :( It can run either of this ways
1 1 1
2 2 2
3 3 3, etc
or this way, which I'd prefer:
...
8
9
10
....1 <---dots were just needed just to move the columns over in here
....2
....3...etc
.........1
.........2
.........3..... etc
maybe something like this:
???
Code:
for i in range(1,11):
i +=1
print i
Code:
for i in range(1,11):
i +=1
j=1
for j in range(1,11):
j +=1
k =1
for k in range(1,11):
k +=1
print i,j,k
1 1 1
2 2 2
3 3 3, etc
or this way, which I'd prefer:
...
8
9
10
....1 <---dots were just needed just to move the columns over in here
....2
....3...etc
.........1
.........2
.........3..... etc
maybe something like this:
Code:
print i
if i ==10:
print j
if j==10:
print k
Comment