Le 29/09/2011 18:27, John Gordon a écrit :
In<a6679459-fc57-4389-8d43-1e5ed960d...@y18g2000yqy.googlegroups.com>  Subhabrata 
Banerjee<subhagurgaon2...@gmail.com>  writes:

 (i) I have a file of lists. Now, the first digit starts with a number
 or index, like,

 [001, "Obama", "USA", "President"]
 [002  "Major", "UK", "PM"]
 [003  "Singh", "INDIA", "PM"]

What about creating a dictionary ?

dic = {1:["Obama","USA","President"],2:[etc.]]


 (ii) My second question is posted by one of my colleagues, what makes
 Python so fast?

If your colleague is used to program inside Word macros, I guess the answer ;) If he is used to program in C, I'm less sure.
It really depends on the context of the question.

Laurent
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to