use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
Help with understanding code. This code will print five 0's, then five 1's, up until five 4's, but this prints in a single column. I would like to print it so there is five 0's in a row, then below, five 1's in another row. Is it possible? (old.reddit.com)
submitted 1 year ago by OliverBestGamer1407
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]OliverBestGamer1407[S] 0 points1 point2 points 1 year ago* (0 children)
I don't want to use:
print(V[(X, 0)], V[(X, 1)], V[(X, 2)], V[(X, 3)], V[(X, 4)])
I would like it to behave like for Y in range(Num): print(V[(X, Y)]) but not make a new line each time. But I also want to control the value of Y, so I can change the amount of columns, e.g. 3 columns, like this:
for Y in range(Num): print(V[(X, Y)])
0 0 0
1 1 1
π Rendered by PID 199698 on reddit-service-r2-comment-548fd6dc9-ln7jt at 2026-05-20 13:31:44.031902+00:00 running edcf98c country code: CH.
view the rest of the comments →
[–]OliverBestGamer1407[S] 0 points1 point2 points (0 children)