#comments

F. Petitjean littlejohn.75 at noos.fr
Mon Sep 13 23:30:36 CEST 2004


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 ....



More information about the Python-list mailing list