#comments

Ken Parkes cbuffer at NOSPAMrosecott.ukfsn.org
Mon Sep 13 17:44:15 EDT 2004


On Mon, 13 Sep 2004 21:30:36 +0000, F. Petitjean wrote:

> On 13 Sep 2004 22:27:32 Ken Parkes <cbuffer at NOSPAMrosecott.ukfsn.org>
> wrote:
>> Hi,
>> 	New to this game.  Have tried the following.
>> 
>>   data=raw_input("Type something  ") # spaces after "something"
>>   myInput=data
>>   print "You typed " myInput  # and again
>     print "You typed ", myInput  # and again   # note the comma
>>   print "The fourth character is "myInput[3]  # and again
>     print "The fourth character is ", myInput[3]  # and again  # same
>> 
>> When I run it in the shell I get error warnings for the second comment (
>> actually pointing to the t of myInput )  If I remove the comment I get
>> one for the third comment.  What is wrong please?
>   The print statement is :
>     print  item1, item2 ....

Ah, I see, thank you for that.  A follow up please. Do you see the last
line beginning with   < print "The fourth..... > ?  Pan is chopping the
lines up on my monitor.

Thanks Ken.



More information about the Python-list mailing list