Guest User

Untitled

a guest
Nov 20th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. # ex: wave("hello") => ["Hello", "hEllo", "heLlo", "helLo", "hellO"]
  2. def wave(st):
  3. return [st[:i] + st[i].upper() + st[i+1:] for i, char in enumerate(st) if char.isalpha()]
Add Comment
Please, Sign In to add comment