The Student Room Group

Best Python book/resource for beginners?

ok so im completely new to programming (apart from making a green square in BASIC a few years ago:biggrin:) and have decided to punt for Python 3.x as the way to go, there does seem to be a lot of resources out there for this language but I'm a bit lost as to where to start, so does anyone have any recommendations for a good, comprehensive book that doesn't require previous programming knowledge?

Scroll to see replies

Original post by Hoochy91
ok so im completely new to programming (apart from making a green square in BASIC a few years ago:biggrin:) and have decided to punt for Python 3.x as the way to go, there does seem to be a lot of resources out there for this language but I'm a bit lost as to where to start, so does anyone have any recommendations for a good, comprehensive book that doesn't require previous programming knowledge?


Don't buy books; that's what the internet is for!

http://wiki.python.org/moin/BeginnersGuide/Programmers

I've been 'taught' Python at university, and most of my work consisted of me googling whatever function I was trying to use.

Edit: If you want, I can probably send you the tutorial I used with examples and so on.
Original post by Awoodrow2
Don't buy books; that's what the internet is for!

http://wiki.python.org/moin/BeginnersGuide/Programmers

I've been 'taught' Python at university, and most of my work consisted of me googling whatever function I was trying to use.

Edit: If you want, I can probably send you the tutorial I used with examples and so on.


what course were you taught it on?

I was thinking of learning it but when I mentioned to the theoretical physics guys they either laughed/sneered at it lol. Maybe i'll stick with c++
Reply 3
http://learnpythonthehardway.org/

Once you get to a certain stage then the best way to learn is to find an interesting problem to solve and then learn how to solve it.

If you like Maths: Project Euler (This gets pretty deep pretty deep after ~50 problems)
Otherwise: Programming Praxis

They are both good sources of problems, the most important part of being able to program is thinking logically. If you can think logically and can find out where to get help (ie documentation, stackoverflow.com) then you can program anything only knowing the basics.

Good luck, if you need any more help then PM me.
Original post by Hoochy91
ok so im completely new to programming (apart from making a green square in BASIC a few years ago:biggrin:) and have decided to punt for Python 3.x as the way to go, there does seem to be a lot of resources out there for this language but I'm a bit lost as to where to start, so does anyone have any recommendations for a good, comprehensive book that doesn't require previous programming knowledge?


All I know about it is that it's meant to be a nicer introduction to object oriented programming that you would get from c++ and easier to self learn.

depends what you want to do with it though
Reply 5
Original post by fortransexual
what course were you taught it on?

I was thinking of learning it but when I mentioned to the theoretical physics guys they either laughed/sneered at it lol. Maybe i'll stick with c++


Really? Python is a great language for scientists as you can write programs in it very quickly. It is true that C++ is quicker but for most cases I would use python.
Original post by fortransexual
what course were you taught it on?

I was thinking of learning it but when I mentioned to the theoretical physics guys they either laughed/sneered at it lol. Maybe i'll stick with c++


This was Durham University's Physics course (all physics students do this same course regardless of specialisation) - Python's generally popular with our department when we actually have need to write code. I think at other unis the Physics department are more likely to teach things like C++ because it's a language with more applications at the moment.


Would anyone recommend reading this before "An Introduction to Computer Science - John Zelle"?
Original post by Awoodrow2
This was Durham University's Physics course (all physics students do this same course regardless of specialisation) - Python's generally popular with our department when we actually have need to write code. I think at other unis the Physics department are more likely to teach things like C++ because it's a language with more applications at the moment.


The mandatory one at my uni for undergrads is C (I think python can be allowed if you get permission), the postgrads I have spoken to know c, fortran and c++ but I've only asked theoretical people so I suppose that makes sense - nobody else would bother learning fortran especially.

I think the C++ learning curve would be too steep for many UG's or at least cause a lot of issues
Reply 9
learnpythonthehardway.org is really great if you are new or begginer. Thank me later :smile: It will teach you good habbits that you wanna have.

EDIT: Ok, looks like I was too late but I noticed the post (quote to it) only when I posted ... NEvermind...
(edited 11 years ago)
Reply 10
Original post by InvertedLayman
Would anyone recommend reading this before "An Introduction to Computer Science - John Zelle"?


Never read it, I would start with learn python the hard way because the online version is free.
Reply 11
Original post by SecondHand
http://learnpythonthehardway.org/

Once you get to a certain stage then the best way to learn is to find an interesting problem to solve and then learn how to solve it.


Hey thanks that looks really good (and cheap), only thing is it looks like its for python 2.5.x, will it be a problem learning the basics using 2.x and then moving on to 3.x or are they similar enough that it doesn't really matter anyway?
Reply 12
Original post by Hoochy91
Hey thanks that looks really good (and cheap), only thing is it looks like its for python 2.5.x, will it be a problem learning the basics using 2.x and then moving on to 3.x or are they similar enough that it doesn't really matter anyway?


They're not too different, 2.x is currently more common than 3.x. It would probably be easier to learn in 2.x if the book is in 2.x but in the future changing to 3.x won't be a problem.
Reply 13
Not many people know about this, but it's literally the best coding resource I've ever seen in my life.

It's fantastic and I recommend it to anyone and everyone. http://www.pyschools.com/

Kudos to the creator.
Original post by Hoochy91
Hey thanks that looks really good (and cheap), only thing is it looks like its for python 2.5.x, will it be a problem learning the basics using 2.x and then moving on to 3.x or are they similar enough that it doesn't really matter anyway?


I think pretty much everything is the same for the basics, apart from a couple of things like how division works.
Reply 15
Original post by fortransexual
what course were you taught it on?

I was thinking of learning it but when I mentioned to the theoretical physics guys they either laughed/sneered at it lol. Maybe i'll stick with c++


People tend to stick with what they know and aren't very open. Python is the current language taught for physics at durham but alot of the professors still insist on using fortran. It's incredibly easy to use though and can be optimised to run faster if your using intensive programs (see psyco and similar)
Original post by vaseand
People tend to stick with what they know and aren't very open. Python is the current language taught for physics at durham but alot of the professors still insist on using fortran. It's incredibly easy to use though and can be optimised to run faster if your using intensive programs (see psyco and similar)


I know pythons easier to use which makes it a good choice for undergrads - but many supercomputers are designed for fortran - even if new ones dropped fortran, it would not be python so these professors might have a good reason. If they are using fortran for the basic every day stuff and undergrad type questions I would agree that's backwards.

Also it's not like it's python is the standard language taught everywhere - as I said, here (bristol) it's C for undergrads - and our theoretical physics, maths and computer science depts are not exactly clueless. Could do with finding out about some more uni's at two data points is a bit useless.

I'm a bit annoyed that we don't do an object oriented language as standard, but I think i'll go for c++ in my spare time as I think that if I did need to use python for a job down the line it would be easier to make the transition to python than it would be going from friendly python to c++.
Reply 17
Original post by fortransexual
I know pythons easier to use which makes it a good choice for undergrads - but many supercomputers are designed for fortran - even if new ones dropped fortran, it would not be python so these professors might have a good reason. If they are using fortran for the basic every day stuff and undergrad type questions I would agree that's backwards.

Also it's not like it's python is the standard language taught everywhere - as I said, here (bristol) it's C for undergrads - and our theoretical physics, maths and computer science depts are not exactly clueless. Could do with finding out about some more uni's at two data points is a bit useless.

I'm a bit annoyed that we don't do an object oriented language as standard, but I think i'll go for c++ in my spare time as I think that if I did need to use python for a job down the line it would be easier to make the transition to python than it would be going from friendly python to c++.


Well supercomputers are never going to run python, that would be pointless as it isn't designed for highly intensive programs. That's where you would use C(++) but if you want to be quickly modelling various bits of physics etc. then python is ideal as it is quick and efficient to write.

http://xkcd.com/353/
Python is one of the most trending programming Languages in the globe nowadays. Khan Academy has some good tutorials too

https://youtube.com/playlist?list=PLh3qc9GVTzw_cX8OYnFgmrV3F_SYsc6Vw


and some best books are:
1: Head First Python
2: Learning Python
3: Python Tricks
4: Fluent Python
5: Python in Nutshell
also found this https://www.techgeekbuzz.com/best-python-books/, in the internet author separately listed books for beginners and for advanced developers here
Thank you very much for the recommendations. It seems to me that one of the best and most informative books on the topic is "Python Crash Course" by Eric Matthes. The book begins with a step-by-step guide to the basic elements and data structures of Python, working with variables, strings, numbers, lists and tuples, describing how you work with each. Then if statements and logical tests are considered, followed by diving into dictionaries. The book then covers user input, loops, functions, classes, and file handling, and testing and debugging code. A very accessible book, which at one time helped me a lot.

Latest

Trending

Trending