Just starting out!

Remco Gerlich scarblac at pino.selwerd.nl
Wed Dec 27 06:08:46 EST 2000


Daniel <Daniel.Kinnaer at AdValvas.be> wrote in comp.lang.python:
> Where can one find a tutorial with lots and lots of example code?
> Reading about theory is fine when one already is proficient at a
> language... I learn fastest when examples are given, and that is what
> I'm looking for. Is there such a book/tutorial available?

There is an electronic book called "(the eff bot guide to) The Standard
Python Library" that is based on over 2500 newsgroup posts by Fredrik
Lundh, it has examples for every standard Python library.

http://www.secretlabs.com/people/fredrik/librarybook.htm

It's $12 (Windows only I think).

> As a newbie to Python, I always compare with Delphi and how I would go
> about solving a problem.  Very often, I can't find an answer in the
> ref-guide nor in the tutorials (or I am looking at the wrong places
> :-)  E.g.  I was trying to convert a number to a string and add
> another string to it. In Delphi i would write s:= IntToStr(myNumber) +
> ' is my number';  How is this done in Python? 

Either

s = str(myNumber)+" is my number"

or

s = "%d is my number" % myNumber

str(), int(), float(), list(), tuple() are the obvious convertion functions.
(there are probably a few I didn't list).

-- 
Remco Gerlich



More information about the Python-list mailing list