Question on Manipulating List and on Python

John Gordon gordon at panix.com
Thu Sep 29 12:52:53 EDT 2011


In <71c71a9d-928d-4ebe-af64-674c31bc1c09 at e9g2000vby.googlegroups.com> Subhabrata Banerjee <subhagurgaon2011 at gmail.com> writes:

> Hi John,
> The actual code is till now is:

> def name_debugger(n):
>     open_file=3Dopen("/python27/name1.txt")
>     for line in open_file:
>         line_word=3Dline.split()
>         #print line_word
>         word1=3Dline_word[0]
>         print word1

Can you give us some sample lines from /python27/name1.txt ?

> And Python seems faster than C++/Java. It is indeed. I also experience
> it.

It shouldn't be inherently faster than C++ or Java.  If it is, it's
because the C++ or Java code is doing more work.

Do you have a sample Python program and a sample C++ or Java program
to demonstrate the speed difference?

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon at panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"




More information about the Python-list mailing list