Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- empL = [] #just an empty list
- index = 0 #just an index counter
- empS = "" #just an empty String
- for i in text:
- empL.append(i) # in this loop ill be adding the str passed in by "text" char by char to the empty list
- else: # since this its a for/else loop this is also going to run
- for char in empL: # iterates to each element in the list
- if char in "aeiouAEIOU": **# if the element thats being iterated at the moment is cotained in this string**
- empL.remove(char) #remove it
- else: #yes this is going to run because it's another for/else
- sizeEmpL = len(empL) # just the size of empty list
- while sizeEmpL != 0 :
- empS = empS + empL[index]
- print(empS)
- index += 1
- sizeEmpL -= 1
- print(empL)
- print(empS)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement