37 Comments
- inkswamp, on 10/12/2007, -0/+3Excellent! There aren't enough language tutorials out there that cut to the chase like this. It drives me bonkers that every tutorial I find has to start off with 10 pages of introducing basic concepts that any aspiring programmer ought to already understand (loops, conditionals, variables, comments, etc.) which are 90% the same conceptually from language to language anyway.
- ravenmuffin, on 10/12/2007, -0/+2Good cheatsheet, but calling it a tutorial is a bit like giving someone a list of a 20 French phrases and calling it "Learn French in 10 minutes!"
But very useful if you know Perl or another scripting language and want to see what the fuss about Python is all about and a taste of what makes it so great.
Wikipedia has a good introduction too, including the great "we don't need no stinkin' braces" debate!
http://en.wikipedia.org/wiki/Python_language - 1b1d1ot, on 10/12/2007, -0/+1this just in, learn python in two seconds. "py" + "thon". good job. you may add it to your resume now.
- Haplo, on 10/12/2007, -0/+1@jo42
You probably are not an experienced programmer, since if you were, you already are using whitespace to mark blocks. Python only makes it easier, no need for braces.
Also, in your 25 years you have missed out some languages that have similar requirements. Pitty. - dognose, on 10/12/2007, -1/+1since FORTRAN, I've just said NO to languages that are whitespace sensitive... It can make it a pain copying code when things like HTML are not whitespace sensitive.
- mapledream, on 10/12/2007, -0/+0I appreciate the effort, but it's not worth the first page on Digg.
I am against all this hurry. Take your time to learn Python. - Stonekeeper, on 10/12/2007, -0/+0Python is the first language I've been totally comfortable with.
- Harlequn, on 10/12/2007, -0/+0Hypertalk is still my favorite language of all time.
- bmw@, on 10/12/2007, -0/+0> you already are using whitespace to mark blocks.
> Python only makes it easier, no need for braces.
Snort! Yeah, braces are *soooo* hard to type. And so how in hell are you gonna you use vi's % key to locate the block boundaries? I'd end up typing in #{ and #} around indented areas so I could use vi properly anyway; in PHP I could save at least two keystrokes. :-) - spyres, on 10/12/2007, -0/+0This thread is proof positive that you can't have a python discussion without a ton of "Ruby spam".
- WallyG, on 10/12/2007, -0/+0Ni!
- obstructio, on 10/12/2007, -0/+0Oh, you think cleaner, easier to read code is worse? Using something almost all good coders already do is bad? I don't understand your logic.
- inactive, on 10/12/2007, -0/+0 Yeah but with all that whitespace crap, can I forget in 10 minutes?
- Toxygene, on 10/12/2007, -0/+0This article is as much an introduction to Python as touring a Boeing plant is to flying an airplane. It's nice to see, but you haven't really learned anything.
- ravenmuffin, on 10/12/2007, -0/+0@salsaman: "The page has an problem in the second code block:
lstList = ["List item 1", 2, 3.14]
lstList[0] = "List item 1 again"
NO!"
The code is okay. They're demonstrating how you can update a list item using array syntax. Your substituting of == would cause the statement to have no effect. - salsaman, on 10/12/2007, -1/+1The page has an problem in the second code block:
lstList = ["List item 1", 2, 3.14]
lstList[0] = "List item 1 again"
NO!
What they meant to say is this:
lstList[0] == "List item 1"
(which is beside the point, actually-- that second statement is an assignment and will change the list's first member.)
This should be "get a taste of Python lists in 10 minutes"-- there's so, so, so much more to Python than lists. If you really want to learn Python, the online tutorial is excellent:
http://docs.python.org/tut/tut.html - kanenas.net, on 10/12/2007, -0/+0Pros... "poromeno" !!!
Bravo re si file, polu kalo !
Keep coding... - bieber, on 10/12/2007, -1/+1Very interesting. There need to be tutorials like this for more languages.
- ravenmuffin, on 10/12/2007, -0/+0@demagogue:
PHP would be a nice addition to your HTML skills, and it wouldn't take long for it to be immediately useful to you. I'd recommend that.
You just need a server to play with. (If you're a Mac OS X user, Apache is built in.) - obstructio, on 10/12/2007, -0/+0Perhaps use an editor with some decent tools?
- Demagogue, on 10/12/2007, -0/+0What would be the best language to learn first out of everything. I know HTML and CSS, but you cant really call those programming....
- Manhigh, on 10/12/2007, -1/+1dognose, fortran did away with whitespace sensitivity in the Fortran90 (as in 1990) standard.
Although I agree with skilless: if you indent anyway, then why use braces? Python feels clean to me. - elrawtic, on 10/12/2007, -0/+0This is a nice refresher and coverage on the Python Language's syntax, but just because I have read it now, does not mean that I have learned it.
Although, once you learn one language, you can pretty much easily adapt to other languages once you learn their syntaxes.
As long as you use similiar algorithms to solve problems, you have dramatically decreased the learning time. - Poromenos, on 10/12/2007, -0/+0Inkswamp: That's what I thought too, which is why I wrote the guide. I want to learn ruby but all the tutorials go on about adding and subtracting numbers, and there's not a small one to get the feeling of the language first.
Salsaman: I meant that as an assignment, to show how elements are accessed, thanks for paying attention though :)
Various people: Of course you can't learn a language in 10 minutes, but if you are famililar with programming, read the tutorial and start getting hands on experience by slowly coding while looking at a reference you'll be good at it sooner and with less effort than reading a book. - kungPow, on 10/12/2007, -1/+0If you want the speed of static typing with a python syntax, see http://boo.codehaus.org/
- kungPow, on 10/12/2007, -1/+0Also here are nice tutorials for ruby. The first is for beginners to programming:
http://pine.fm/LearnToProgram/
The second is interactive and you can run it in your web browser:
http://tryruby.hobix.com/ - mmm_linux, on 10/12/2007, -1/+0that was really good. DIGG.
- majorid, on 10/12/2007, -1/+0Thanks! I've now added Python to my resume.
- MikeCampo, on 10/12/2007, -1/+0Here's a very interesting book on Ruby http://poignantguide.net/ruby/
- 1diot_savant, on 10/12/2007, -1/+0Scrolling through the comments I was surprised at how long it took to get to ruby. After having used both extensively, I can honestly say that if you are looking for a new language to learn, it should be Ruby. Check out the pickaxe book called "Programming Ruby" by Dave Thomas. It's the "definitive guide".
- inactive, on 10/12/2007, -3/+2Yeah but with all that whitespace crap, can I forget in 10 minutes?
- spyres, on 10/12/2007, -2/+1Whitespace haters are likely folks that haven't used python in any real sense with a proper IDE that addresses the issues they may have.
It's just a knee jerk way to hate something (and pretend to have an informed opinion on) that few of them have likely never given a proper chance. - inactive, on 10/12/2007, -2/+1Yeah I learned in 10 minutes and forgot in less.
http://www.firefoxplugs.com - pkrumins, on 10/12/2007, -1/+0YEAH!!! I read the article in 4 minutes and now I am python professional!!! Thanks to this article, I know it better than anyone on this planet!
- jo42, on 10/12/2007, -4/+2> blocks are specified by indentation
This is probably one of the most retarded 'features' in a programming language that I have seen in the last 25 years. Simply shifting something right or left with a space or tab changes the meaning of the code. How stupid can you get.
And I thought having to put a $ in front of every variable in PHP was dumb.
Sigh. - Teh_Psyren, on 10/12/2007, -2/+0Python is winnage.


What is Digg?
The Digg Toolbar for Firefox lets you Digg, submit content, and keep track of Digg even when you're not on the Digg site. Download the official