19 lines
430 B
Python
19 lines
430 B
Python
>>> gen = [ch == '#' for ch in '_###_##_#_#_#_#__#__']
|
|
>>> for n in range(10):
|
|
print(''.join('#' if cell else '_' for cell in gen))
|
|
gen = [0] + gen + [0]
|
|
gen = [sum(gen[m:m+3]) == 2 for m in range(len(gen)-2)]
|
|
|
|
|
|
_###_##_#_#_#_#__#__
|
|
_#_#####_#_#_#______
|
|
__##___##_#_#_______
|
|
__##___###_#________
|
|
__##___#_##_________
|
|
__##____###_________
|
|
__##____#_#_________
|
|
__##_____#__________
|
|
__##________________
|
|
__##________________
|
|
>>>
|