Is it a bug?

Gleb Belov gbelov at gmail.com
Tue Aug 25 16:51:14 EDT 2009


Hey everyone! I'm quite new to Python and equally new to newsgroups in
general, so apologies if this makes no sense.

Basically, I was just exploring Python "arrays" on my own, since I
come from C++. What I did was:
>>> words = ["Hi!", "What's up?", "Bye!"]
>>> print words
['Hi!', "What's up?", 'Bye!']

I have two questions:
1) Is it possible and if so, how do I access each individual element?
Are there any indexes and what is the syntax?
2) I just noticed that the first and the last words in the output are
enclosed in single quotes, and the middle one is enclosed in double
quotes. Is it a bug? If not, why does the output work that way?

Alright, thanks in advance for any replies and I hope I'll manage to
actually find this topic...



More information about the Python-list mailing list