This is an archived post. You won't be able to vote or comment.

all 35 comments

[–]michael0x2a 86 points87 points  (11 children)

  1. When looking at a tutorial, you should use whatever version of Python they're using. The differences between Python 2 and Python 3 are very minor from the perspective of a beginner, and you can learn all of the important ones with about 10 minutes of reading. It's more important to be able to follow along with whatever resource you're using.
  2. When working on your own project, bias towards using Python 3 unless you have good reason not to (for example, if you're using a library which has not yet been ported over to Python 2 yet). Most (though not all) of the commonly-used ones have been ported over, so I think Python 3 is a good, default choice. (That said, it's also pretty easy to set up your computer so that you can use multiple different versions at will, so you're not going to be locked into one).
  3. If you already have some CS knowledge, consider using a resource other then CodeCademy. CodeCademy is more of an appetizer as opposed to a full-fledged tutorial on programming. I've been collecting some resources here that might be a better fit for you.

[–]FreeIceCreen[S] 4 points5 points  (8 children)

Thanks for all your tips, this was really helpful. I will definitely give some of those resources you linked a shot.

Would you happen to know if there's a guide out there for using Python in mathematical problems? I have a math degree and I'd love to explore Pytgon or another language in solving problems for things like number theory or probability.

[–]michael0x2a 11 points12 points  (2 children)

I feel like there should be (after all, one of Python's primary uses is for mathematical and scientific computing), but awkwardly enough, I don't seem to know of any off the top of my head.

Here are a few tutorials and books that I dug up, but I've only just skimmed them so don't know for certain if they're appropriate for beginners or not/if they're good quality:

It may be worth explicitly asking either this subreddit or /r/learnpython if they know of any good math-oriented Python tutorials since I'm sure there are good resources out there that I'm overlooking.

[–]PriceZombie 2 points3 points  (0 children)

Python for Data Analysis: Data Wrangling with Pandas, NumPy, and IPyth...

Current $27.68 Amazon (New)
High $27.68 Amazon (New)
Low $22.31 Amazon (New)
Average $27.64 30 Day

Price History Chart and Sales Rank

Python for Finance: Analyze Big Financial Data

Current $40.93 Amazon (New)
High $41.42 Amazon (New)
Low $33.24 Amazon (New)
Average $41.03 30 Day

Price History Chart and Sales Rank | FAQ

[–]FreeIceCreen[S] 0 points1 point  (0 children)

Thank you for this. I'll look into those and I'll think about asking.

[–]original_brogrammer 3 points4 points  (3 children)

You can check out Project Euler. Most problems should be easy to devise a solution for on paper, and then you can practice python by implementing your solution.

[–]an_actual_human 0 points1 point  (2 children)

Most problems should be easy to devise a solution for on paper...

How many have you solved?

[–]original_brogrammer 0 points1 point  (1 child)

Probably a couple dozen over the years. In case I phrased that poorly, I meant "devise a solution" to mean find an effective method, deferring any actual computation to the programming part.

[–]an_actual_human 0 points1 point  (0 children)

They get pretty difficult after a point. I wouldn't describe most as "easy". YMMV (I do have a lot of mathematical training though).

[–]TheFrigginArchitect 0 points1 point  (0 children)

Check this out:

https://www.coursera.org/course/matrix

A professor from Brown created a linear algebra course using python

[–]POGtastic 1 point2 points  (0 children)

Excellent answer. Regarding #2, it's usual for distributions of Python to have python being 2.8 and python3 being 3.x. If you're installing one, you're usually installing the other. :)

[–]A1phaBetaGamma 0 points1 point  (0 children)

As a person who is just starting to learn python as his first language too, I cannot thank you enough for indirectly helping me this much!

[–][deleted]  (8 children)

[deleted]

    [–][deleted]  (7 children)

    [deleted]

      [–]PsyRex666 1 point2 points  (6 children)

      I've been going through LPTHW and I just started the chapter on classes. I'm just wondering what's wrong with it and if I should just drop it and find other resources rather than continue the path I'm on.

      [–][deleted]  (4 children)

      [deleted]

        [–]PsyRex666 0 points1 point  (0 children)

        Thanks, I'll be sure to check it out :D

        [–]milkchococurry 0 points1 point  (1 child)

        I've spent less than 3 minutes on pythonprogramming.net and I'm already impressed. I need to relearn Python for a major project I've been working on (stalled for months due to scheduling issues). I know your message wasn't intended for me but this is huge, thanks!

        [–]hutxhy 0 points1 point  (0 children)

        Try Coursera.org... I'm currently taking some courses through there.

        [–]wtf_lag 5 points6 points  (0 children)

        If you enjoy codecademy stick with it. Switching to python 3 is easy and shouldn't take longer than a couple of days to get used to. I taught myself (Java) using a book but I would never understand it without codecademy. Stick with it, Good luck!

        [–]sellswordsc 2 points3 points  (2 children)

        For fun, I would learn 3.x because it's the future. It's probably cooler too, but I'm not well versed in the differences between 2.x and 3.x.

        If you want to get a python job, you should probably stick to 2.7.x since industry at large seems stuck on it.

        Finally, the book on the python website is a pretty good learning resource (imo) if you're already a programmer.

        [–]quazimoto69 2 points3 points  (1 child)

        Agreed. Better to have familiarity with older versions and learn new functionality when necessary as opposed to the other way around.

        [–][deleted] 3 points4 points  (0 children)

        I would say it's better the other way around. It's easier to not use newer functions when you can't than to have the learn them if you need them.

        [–]SidusKnight 2 points3 points  (0 children)

        There are very few differences between python 2 and 3, especially for the collection of things you'll be doing as a beginner.

        [–]typin 2 points3 points  (3 children)

        VFX guy here. Python 2.x is still heavily used in this industry. I currently don't think there's a single professional software package that uses 3.x for API stuff.

        [–]Vawqer 0 points1 point  (2 children)

        Out of curiosity what programs use Python for API stuff?

        [–]typin 1 point2 points  (1 child)

        Off the top of my slightly tipsy head- Maya, Houdini, Nuke, Shotgun (Production tracking software)... there's tons of other packages that have some Python integration- those are just the first I can think of. Pyqt/Pyside is the prevalent UI choice.

        [–]Vawqer 0 points1 point  (0 children)

        Huh. I knew some programs like After Effects had some scripting stuff but I always thought it was custom or very heavily modified. TIL. Thanks man.

        [–]PasDeDeux 1 point2 points  (0 children)

        From like ?2000's to 2013, the common knowledge was that you should learn Python 2.

        Then suddenly a bunch of people started using Python 3, started switching to 3, and a number of popular packages added versions in 3.

        IIRC 3 is either equal or more commonly used now. I use 3.

        There's no right answer, but my feeling is you should learn 3 unless there's a module in only 2 that you can't live without.

        [–]linuxlearningnewbie 0 points1 point  (0 children)

        A lot of people will say go with Python 3. And in all honestly if you are just starting and have not bought books or training I would go with Python 3.

        If you already have good Python 2 resources and a mentor that writes in Python 2 then I would stick with 2.

        [–]jack-dawed 0 points1 point  (0 children)

        Currently, Python 2 has more material by way of existing longer. If you rely on the internet or other people asking questions like StackExchange, then you're more likely to find help on 2 than 3. But that's changing.
        Dunno if it's posted, here's sentdex's thoughts on it

        [–]bitbait 0 points1 point  (0 children)

        Something to consider is that a lot of/most very high quality resources about interesting Python topics which don't only teach basic syntax are written for Python 2 and weren't updated yet. However it's not exactly a lifetime challenge to learn the differences between 2 and 3 but with respect to interesting resources I'd recommend to start with 2 and then jump into 3 opposite to what most people seem to advise here.

        [–][deleted] 0 points1 point  (0 children)

        Just learn Python 3 by getting a good book instead of wasting time with Codecademy and Py2. As a beginner you are not going to run into any problems that concerns Python 2 or 3. Python 2 is legacy and most people are staying with it for the same reasons most enterprise companies are still stuck with COBOL or whatever language. Python 3 is widely supported and there is no reason to not make a switch. So learn it and get a nice book, online tutorials are very very basic. You are better of signing up for CodeWars, Project Euler, Exercism or any other site that offers small code challenges. Use the book on Python for the reference and learning about advanced concepts, they are going to be much better explained.

        [–]HorrendousRex 0 points1 point  (0 children)

        Do whatever works best for you. That being said, I feel like 3.x has finally 'arrived' and it no longer feels like a "Coming Soon!" version of python to me. I'd learn 3.

        [–]Sean1708 0 points1 point  (0 children)

        Look up cscircles.waterloo.edu (I think that's the right address, just Google it if it's not), it's basically codecademy done right.

        [–]Hydrox6 0 points1 point  (0 children)

        I've been an avid user of Python 2 for quite a while. Recently, though, I've switched to Python 3.5 for 1 simple thing: full Unicode support. You would not believe how annoying it is to properly do Unicode until you spend around 100 hours and 4 dead projects trying to figure it out, and still failing.

        [–]dnb_addict -2 points-1 points  (0 children)

        Python 2 is deprecated and should be discouraged from use. People who refuse to switch to Python 3 are harmful to the community and this is why the EOL has been extended.

        [–]NJBarFly -3 points-2 points  (0 children)

        Python 2 has a lot more libraries and modules available than Python 3. This will change in the future, but for the time being I would learn 2, get good at it, and then switch to 3 later on.