Variables.

Christos TZOTZIOY Georgiou tzot at sil-tec.gr
Tue Feb 15 07:36:23 EST 2005


On 15 Feb 2005 04:29:26 -0800, rumours say that administrata at hotmail.com
(administrata) might have written:

>I wrote this, It's a bit lame though
>
>I = "Allen"
>me = "Allen"
>my = "Allen's"
>
>print \
>"""
>%s woke up early in the morning. But, it was unusal by %s. %s pillow
>was with %s. %s didn't want to wake up But, %s tried my best and woke up.
>it was so amazing!""" % (I,me,my,me,I,I)
>
>raw_input("\n\\t\t\t- The End -")
>
>But it looks like this...
>
>Allen woke up early in the morning. But, it was unusal by Allen. 
>Allen's pillow
>was with Allen. Allen didn't want to wake up But, Allen tried my best and woke up.
>it was so amazing
>
>                            - The End -

It looks exactly how it should, based on what you gave it.

Try the following changes:

>I = "Allen"
>me = "Allen"
>my = "Allen's"

to

xyzzy = "I"
footy = "me"
spike = "my"

and then change the last line of the triple-quoted string:

>it was so amazing!""" % (I,me,my,me,I,I)

to 

it was so amazing!""" % (xyzzy,footy,spike,footy,xyzzy,xyzzy)

Let us know what you expect to print after these changes.

>HELP plz

By all means --what's the problem exactly?
-- 
TZOTZIOY, I speak England very best.
"Be strict when sending and tolerant when receiving." (from RFC1958)
I really should keep that in mind when talking with people, actually...



More information about the Python-list mailing list