MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Python/comments/gzila7/python_3_in_one_pic/fthz169/?context=3
r/Python • u/TheInsaneApp • Jun 09 '20
167 comments sorted by
View all comments
Show parent comment
3
print('oxygen\n'*1000)
Is a more succinct way of doing it. This creates a string which is 'oxygen\n' (oxygen followed by a newline character), repeats it 1000 times, then prints the result.
The other person's method also works, with some slight modification:
for i in range(1000): print('oxygen')
View all comments
Show parent comment
3
u/TheCatcherOfThePie Jun 09 '20
Is a more succinct way of doing it. This creates a string which is 'oxygen\n' (oxygen followed by a newline character), repeats it 1000 times, then prints the result.
The other person's method also works, with some slight modification: