0
Simple Code
def make_word():   word = ""   for ch  in "spam":     word +=ch     yield word print(list(make_word())) Output: s, sp, spa, spam
2 Answers
+ 6
No offense but there's a section in this app for posting codes you know.
0
Cool
def make_word():   word = ""   for ch  in "spam":     word +=ch     yield word print(list(make_word())) Output: s, sp, spa, spam