DEV Community

Discussion on: Daily Challenge #44 - Mexican Wave

Collapse
 
matrossuch profile image
Mat-R-Such • Edited

Python

def wave(string):
    s=[i for i in string]
    for i in range(len(s)):
        s[i] = s[i].upper()
        yield ''.join(s)
        s = [i for i in string]

for i in wave('hello'):
    print(i)