the-honk/daily-programmer/#391 - ABACABA.py
2024-10-09 18:02:36 +01:00

14 lines
291 B
Python

from string import ascii_lowercase
def abacaba(n):
output = ''
currLetter = 0
for i in range(n):
output = '{0}{1}{2}'.format(output, ascii_lowercase[currLetter], output)
currLetter = currLetter + 1
if currLetter > 25:
currLetter = 0
return output
out = abacaba(10)
print(out)