My python sol :
def wave(s): wave_list = [] for i,c in enumerate(s): wave_list.append(s[:i]+c.upper()+s[i+1:]) return wave_list
In one line with a generator and a lambda function :
wave = lambda s : [f'{s[:i]}{c.upper()}{s[i+1:]}' for i,c in enumerate(s)]
Love it
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
My python sol :
In one line with a generator and a lambda function :
Love it