the-honk/challenges/daily-programmer/#391 - ABACABA.py

15 lines
291 B
Python
Raw Normal View History

2024-10-09 17:02:30 +00:00
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)