Usefull python tutorial

G

gentlestone

Can somebody give me an advise where I can found a really good online
tutorial? All I found are useless. For example no tutorial I found
explains this piece of code:

someList = [element for element in otherList if element is not
None]

or this example:

a = a or []

There are only stupid elementary examples in the tutorials I found.
 
C

Chris Rebert

Can somebody give me an advise where I can found a really good online
tutorial? All I found are useless. For example no tutorial I found
explains this piece of code:

   someList = [element for element in otherList if element is not
None]

See http://docs.python.org/tutorial/datastructures.html#list-comprehensions
or this example:

   a = a or []

That's a bit more obscure, and I'm not entirely surprised it's not in
a tutorial:
http://docs.python.org/reference/expressions.html#boolean-operations


You might want to try the official tutorial (unless it's the one
you're complaining about):
http://docs.python.org/tutorial/index.html

I've also heard good things about Dive Into Python:
http://diveintopython.org/

Cheers,
Chris
 
S

Simon Brunning

2009/8/26 gentlestone said:
Can somebody give me an advise where I can found a really good online
tutorial? All I found are useless.

<http://docs.python.org/tutorial/> is really good, as I remember, as
is <http://diveintopython.org/>.

For example no tutorial I found
explains this piece of code:

   someList = [element for element in otherList if element is not
None]

<http://docs.python.org/tutorial/datastructures.html#list-comprehensions>
or said:
or this example:

   a = a or []

Strangely not in the tutorial:
<http://docs.python.org/library/stdtypes.html#truth-value-testing>.
 

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

No members online now.

Forum statistics

Threads
474,199
Messages
2,571,045
Members
47,643
Latest member
ashutoshjha_1101

Latest Threads

Top