newbie question

K

Kevin F

what does it mean when there are [0] or [1] after a variable?

e.g. print 'Message %s\n%s\n' % (num, data[0][1])
 
J

John Machin

what does it mean when there are [0] or [1] after a variable?

e.g. print 'Message %s\n%s\n' % (num, data[0][1])

Here's the section in the Python Tutorial that should answer your question:

http://docs.python.org/tut/node5.html#SECTION005140000000000000000

You may like to start at the *beginning* of the Tutorial :)

.... or you might like to ask another question, stating your experience
if any with other languages, what you want to do with Python, and asking
for general advice on how to learn Python.

Cheers,
John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,792
Messages
2,569,639
Members
45,353
Latest member
RogerDoger

Latest Threads

Top