[Tutor] basic problem

ADRIAN KELLY kellyadrian at hotmail.com
Fri Oct 7 00:11:37 CEST 2011




 Hi all,
can someone spell out to me in (simply if possible) what this programme is doing.  i understand the concept of the "for" loop and 
what its doing with the message the user enters.  i just cant understand the VOWELS and how it keeps adding 1 letter to the message.
 
thanks for looking
A
 
  
# this programme will adding something to everything the user
#types by using a for loop
#set values
new_message=" "
VOWELS="AEIOU"
message=raw_input ("Enter a message: ")
for letter in message:
    if letter.lower() not in VOWELS:
        new_message = new_message+letter
        print new_message
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111006/64767b6c/attachment.html>


More information about the Tutor mailing list