Hi,

Method-I:
=========

I1 = "John1" 
I2 = "John2" 
I3 = "John3" 

print "%s, %s and %s used to love pizza" % (I1,I2,I3)

Method-II:
=========
use dictionaries,

name["I1"] = "John1"
name["I2"] = "John2"
name["I3"] = "John3"

print "%{I1}s, %{I2}s and %{I3}s used to love pizza" % name


HTH,
Vishnu

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ÃÃ ÃÃÂÂ
Sent: Tuesday, February 15, 2005 4:18 PM
To: tutor@python.org
Subject: [Tutor] Variables

How can I do it with several variables? 


I = "John" 
print "%s used to love pizza" % I 

About 10 or more... 

HELP plz :)

_________________________________________________________________
ìê ìë êì ëëê ííê ëì ì ììëë. MSN 
ìê/íì   
http://www.msn.co.kr/stock/  

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to