Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. empL = [] #just an empty list
  2.  
  3. index = 0 #just an index counter
  4.  
  5. empS = "" #just an empty String
  6.  
  7. for i in text:
  8.  
  9. empL.append(i) # in this loop ill be adding the str passed in by "text" char by char to the empty list
  10.  
  11. else: # since this its a for/else loop this is also going to run
  12.  
  13. for char in empL: # iterates to each element in the list
  14.  
  15. if char in "aeiouAEIOU": **# if the element thats being iterated at the moment is cotained in this string**
  16.  
  17. empL.remove(char) #remove it
  18.  
  19.  
  20. else: #yes this is going to run because it's another for/else
  21.  
  22. sizeEmpL = len(empL) # just the size of empty list
  23.  
  24. while sizeEmpL != 0 :
  25.  
  26. empS = empS + empL[index]
  27.  
  28. print(empS)
  29.  
  30. index += 1
  31.  
  32. sizeEmpL -= 1
  33.  
  34. print(empL)
  35.  
  36. print(empS)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement