Python Tutorials?


  • Tutorialist

    Hopefully this is an alright place to put this. Can anyone point me to a few good python tutorials for beginners? As in never touched it before ever?

    Please don't tell me how great it is, or how much you hate it, I need to learn it for one half of my final for my CompSci class, so I don't really care about opinions on python.


  • Pitcrew

    I have 2.5 Suggestions:

    In book form: Hello World. It's python code book intended for kids but half the adult Python coders I know learned at least from the book. The book is written very well, its very comprehensive, and I endorse it. The only possible downside is I don't know if its updated for Python 3 but it might be. (http://www.amazon.com/Hello-World-Computer-Programming-Beginners/dp/1617290920

    In website form: Learn Python The Hard Way http://learnpythonthehardway.org/ - I know several people who have done well in learning it this way.

    Pyladies! (http://www.pyladies.com/) I'm not sure where you live but this organization is for Python programmers with lady parts. They teach free or donation suggestion boot camps around the country and have meet ups. It's great for learning, getting questions answered, and networking if you're going to be looking at coding jobs once you're done with school (or before).



  • I write python 2.7 professionally on a daily basis.

    I learned it from "Python for Unix and Linux System Administration" being already familiar with a handful of other programming languages outside of softcode. IIRC, the book is largely recipe-focused which makes it practical but perhaps with a slightly steeper learning curve. The book talks a lot about ipython which is a wonderful resource for exploration and experimentation.

    I cannot overstate the value of learning a test framework (like pytest), a mocking framework (pymock), a logging framework (we use an in-house one), and the python debugger.

    For anyone else who wants to get into programming but doesn't have much experience I strongly recommend putting like 40 hours into http://turtleacademy.com/. It teaches a toy language called LOGO that's useless except for making pretty pictures and teaching fundamental programming concepts with minimal confusion.



  • Logo used to be how you ran mindstorm Legos. I'm not sure they were called mindstorm back then, but it's the same line. We used them in Jr. High back then but you can just buy them now.

    Now I want to play Nibbles. Man we loved that game.


  • Coder

    @Sponge said:

    I cannot overstate the value of learning a test framework (like pytest), a mocking framework (pymock), a logging framework (we use an in-house one), and the python debugger.

    I think it depends on level of experience. I don't know what level @Cobaltasaurus is at, but I think most of that is too much for a beginner still learning primitives.



  • @Cobaltasaurus This site could help: http://www.codecademy.com/

    Has python listed as one of the languages it teaches. Suppose to be free tooooooooooooooo.



  • @ThatOneDude said:

    @Cobaltasaurus This site could help: http://www.codecademy.com/

    Has python listed as one of the languages it teaches. Suppose to be free tooooooooooooooo.

    It's a great language for getting things done. I think it's a terrible teaching language though, at least as an introductory language. You have to absorb fundamental programming structures and syntax and the API and software architecture (OO, functional, modules, etc), all at the same time. Same is true for just about all the common languages nowadays. Shame that Pascal seems to have died off.

    @Glitch said:

    @Sponge said:

    I cannot overstate the value of learning a test framework (like pytest), a mocking framework (pymock), a logging framework (we use an in-house one), and the python debugger.

    I think it depends on level of experience. I don't know what level @Cobaltasaurus is at, but I think most of that is too much for a beginner still learning primitives.

    I agree and I should have stated that.


  • Tutorialist

    @Glitch said:

    @Sponge said:

    I cannot overstate the value of learning a test framework (like pytest), a mocking framework (pymock), a logging framework (we use an in-house one), and the python debugger.

    I think it depends on level of experience. I don't know what level @Cobaltasaurus is at, but I think most of that is too much for a beginner still learning primitives.

    Most of that went over my head. I had very basic introductions to C++ and Visual Basic in middle school, and can cobble together something in CSS thanks to leaning from wikis, but other than that my experience is in softcode.



  • @Cobaltasaurus said:

    Most of that went over my head. I had very basic introductions to C++ and Visual Basic in middle school, and can cobble together something in CSS thanks to leaning from wikis, but other than that my experience is in softcode.

    There are all kinds of ways modern languages try to keep you from shooting yourself in the foot and to help you structure your programs so that they don't grow into a hideous mess that no one can understand.

    When you use these language features you either have to already understand what they do or you're stuck parroting code you've seen. However, when you change the code you've copied it can behave in strange ways. These features are essentially magic to a beginner and in python and similar languages you can't avoid using these features. Thus you end up having to write programs you don't have the prerequisite knowledge to understand. Not a problem with the language, it's just a bad for as an introductory language.

    If you're not really comfortable programming outside of MU, I strongly recommend LOGO as a supplement to python. It will make learning python significantly easier.



  • Codeacademy is alright but like any language, you don't use it and forget it. That said, I've used code academy extensively with some degree of success, mainly with JavaScript, Python and Ruby. I learned Logo and Pascal in school, along with basic, C++ and other crap like Visual Basic (I hate you Visual Basic).

    The problem is pacing, consistency and application. The key is having a reason why and then applying it. Not a reason like I'd love to learn it because I want to make all the money, but something to create with the code. Like projects. Like you do in school.

    At least I've found.

    Find a local hack group and go hang out with them. We have chick coding groups in my city.

    I'm just not super sold on the free model. Books, classes in various formats with people to turn to and applied projects.


  • Tutorialist

    @Sponge said:

    If you're not really comfortable programming outside of MU, I strongly recommend LOGO as a supplement to python. It will make learning python significantly easier.

    I don't really have the time for that, thank you for the advice though. Once my class project is overwith I'll maybe look into LOGO. Though I have a feeling I'll get exposure to it with the next project for class which is a group project for lego kits.

    I'm not uncomfortable with programming outside of a MU, just inexperienced.



  • @Cobaltasaurus Logo isn't used any longer with Mindstorms. They're no longer purely an educational/institution thing, you can buy them at Target and Toys R Us now. I'd have a set of the baby were a bit older. That was 23 years ago when you also had to install a card into the PC and literally plug it into your motor and tell your turtle to go forward however long you wanted your motor to go forward.

    Logo is from the 60s. Pascal too I think. I learned them in public school in the early 90s and they were 'old' then. I agree that they're amazing foundations, back then you didn't take computer science unless you had been screwing with stuff already. I had been programming basic since forever (PC magazine used to publish a 'game' in their magazine, it was pages of code you input yourself).

    If you're taking a class in school I imagine they just assume you've got some sort of foundation built in hardcode. There's a reason they still taught Pascal in middle school/high school in the 90s, I just didn't see it then.



  • @Cobaltasaurus said:

    I'm not uncomfortable with programming outside of a MU, just inexperienced.

    I'd give the Codecademy a shot.



  • And a decent IDE.


  • Pitcrew

    I was poking around with Python for a little while. I have a small collection of notes, not composed by me but completely made to share if you use Evernote.

    There is such a large mass of stuff online, it's hard to narrow it down. It really depends on how you learn. I have to see an example, take it apart, and put it back together before it really clicks for me.

    I also have somehow enmassed a few ebooks I can share as well.


  • Tutorialist

    My kingdom if someone could give me a hint on how to get a while to give me a list of numbers.

    ETA: NVM. A kindly season helped me figure it out.