Looping counter [FINALIZED]
+3
−0
Looping counter
Create an infinite loop that outputs lines of asterisks, with each line containing one more asterisk. Instead of the asterisk, any printable, non-whitespace character can be used. However all lines need to use the same character.
The beginning of the output looks like this:
*
**
***
****
*****
******
*******
********
*********
**********
***********
************
An ungolfed Python implementation:
from itertools import count
for i in count(1):
print('*'*i)
1 comment thread