Python - editing my range to print certain strings -


i'm trying edit code produce 10 lines. first line starts @ 0 , last ends @ 9. each line contains string of 10 integers 0 being first , in successive order. have produced following , cannot life of me figure out next.

for in range(10):     in range(10):         print(i,end=' ')     print('\n') 

which output

0 1 2 3 4 5 6 7 8 9   0 1 2 3 4 5 6 7 8 9   0 1 2 3 4 5 6 7 8 9   0 1 2 3 4 5 6 7 8 9   0 1 2 3 4 5 6 7 8 9   0 1 2 3 4 5 6 7 8 9   0 1 2 3 4 5 6 7 8 9   0 1 2 3 4 5 6 7 8 9   0 1 2 3 4 5 6 7 8 9   0 1 2 3 4 5 6 7 8 9  

if you're trying make each line 0 0 0 0 0 0 0 0 0 0, , on, problem reusing variable loops:

for in range(10):     j in range(10):         print(i,end=' ') #now 0 first line, 1 next, , on     print('\n') 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -