Wzór choinki w python

Jak wypisać choinkę liter słowa python?

#wzór choinka liter
my_word = "python"
x = 0

for i in my_word:
    x = x + 1
    print(my_word[0:x])

for i in my_word:
    x = x - 1
    print(my_word[0:x])

Leave a Comment

Scroll to Top