Advertisement
Guest User

Untitled

a guest
May 23rd, 2015
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. def shortenPlus(s):
  2.     vowels = ['a', 'e', 'i', 'o', 'u']
  3.     noVowels = ""
  4.     index = 0
  5.     for char in s:
  6.         if char in vowels:
  7.             if index == 0:
  8.                 noVowels += char
  9.             else:
  10.                 noVowels += ""
  11.         elif char == " ":
  12.             noVowels += char
  13.             index = 0
  14.         else:
  15.             noVowels += char
  16.             index += 1
  17.     return noVowels
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement