• Support PF! Buy your school textbooks, materials and every day products Here!

Python -- recommended books

  • Computational
  • Thread starter Arman777
  • Start date
  • #1
1,777
139

Main Question or Discussion Point

Hey all, I think most of you know me and probably this question will sound silly but anyways, I am learning python over a 3 month now and The course in the school is over and there will no other course. I want to learn more and is there any source you can recommend me.

What I know:
1-I know the simple commands like for,while,if
2-I know how to write functions


This is kind of all I mean in coding I use these , actually that's what is mostly used (I guess). But I want to learn more about the technic of it. For example simple tips or shortcuts or writing more efficient.
Other then that numerical analysis or more about the math stuff of the python

Nearly a month ago someone recommend me Project Euler and I am doing them so far. But I think I need to practice more and try to learn more. Any books/online sources that can you guys can recommend me ?

I know there are lots of books but like for a physics student what you can recommend ?

I ll also ask this question to my professor.
 

Answers and Replies

  • #6
94
2
Any other resorces not necessary applied to physics, but to general programming with Python?
 
  • #7
1,777
139
Any other resorces not necessary applied to physics, but to general programming with Python?
Yeah sure that would also be great. It doesnt have to be neceserrily on physics
 
  • #9
StoneTemplePython
Science Advisor
Gold Member
2019 Award
1,158
564
I like the Free Books from Allen Downey, available here:

https://greenteapress.com/wp/

in particular you may enjoy Think Python.

I liked Think Bayes when a I read it a little while back. Think Complexity is pretty decent.

- - - -
There's a newish one I haven't checked out called

Modeling and Simulation in Python

"Models of discrete systems, like population growth, first-order systems, like epidemics and thermal systems, and second-order systems, like mechanical systems. For people who have not programmed before."

sounds potentially interesting
 
  • Like
Likes Arman777
  • #11
QuantumQuest
Science Advisor
Insights Author
Gold Member
926
485
I would recommend Learning Python by Mark Lutz. It is a content-rich book if you are interested in programming with Python i.e. not just using the fundamentals.
A good free book in a CS context i.e. presenting Python along with problem solving, algorithms and data structures is this one.
For Python resources I would recommend Deitel's Python Resource Center.
 
  • Like
Likes Arman777
  • #12
1,777
139
It will be a long summer for me :)
I would recommend Learning Python by Mark Lutz. It is a content-rich book if you are interested in programming with Python i.e. not just using the fundamentals.
A good free book in a CS context i.e. presenting Python along with problem solving, algorithms and data structures is this one.
For Python resources I would recommend Deitel's Python Resource Center.
Learning python also seems really nice. I ll definitly check I guess I should start with the learning python rather then the think python ?
 
  • #13
33,635
5,295
in particular you may enjoy Think Python.
I just downloaded the PDF, and have very briefly scanned parts of it. One section that I spent a bit more time on was the chapter on debugging. I'm surprised he doesn't mention PDB, the Python debugger. It's pretty primitive, but useful nonetheless.

When I was teaching myself Python a couple of years ago, I put together a two-part Insights article on how to use many of the features of the built-in debugger.
https://www.physicsforums.com/insights/simple-python-debugging-pdb-part-1/
https://www.physicsforums.com/insights/simple-python-debugging-pdb-part-2/
 
  • #14
StoneTemplePython
Science Advisor
Gold Member
2019 Award
1,158
564
I just downloaded the PDF, and have very briefly scanned parts of it. One section that I spent a bit more time on was the chapter on debugging. I'm surprised he doesn't mention PDB, the Python debugger. It's pretty primitive, but useful nonetheless.

When I was teaching myself Python a couple of years ago, I put together a two-part Insights article on how to use many of the features of the built-in debugger.
https://www.physicsforums.com/insights/simple-python-debugging-pdb-part-1/
https://www.physicsforums.com/insights/simple-python-debugging-pdb-part-2/
Yea, you can get surprisingly far on even more primitive things like print statements, but at some point will need to use the debugger. I kind of think using the debugger is too much machinery for a brand new programmer (as opposed to someone who's just new to the language).
 
  • #15
QuantumQuest
Science Advisor
Insights Author
Gold Member
926
485
...I guess I should start with the learning python rather then the think python ?
Well, I think that this would be a good idea as Learning Python starts from fundamentals about Python, Python interpreter, how to run programs on a machine etc. and goes on in a sufficiently detailed way regarding programming with Python itself. Of course, you may choose starting from another book / resource as there is a whole lot of great books about this language but the good thing about "Learning Python" is that it has a lot of stuff gathered together.
 
  • #16
1,777
139
Well, I think that this would be a good idea as Learning Python starts from fundamentals about Python, Python interpreter, how to run programs on a machine etc. and goes on in a sufficiently detailed way regarding programming with Python itself. Of course, you may choose starting from another book / resource as there is a whole lot of great books about this language but the good thing about "Learning Python" is that it has a lot of stuff gathered together.
I ll try to look at it first starting from tomorrow, we will see but yes in the comments in the amazon they are saying its a dictionary
 
  • #17
1,777
139
I start to read learning python until to chapter 4. I think it has unnecessary details for me and it takes too long to express the ideas. Like if statements starts at page 371 ? I ll start to read think python it seems more nice and giving just the core ideas or details. Like Learining python would be good if someone studying a computer engineering but I dont think I would need such detailed description.
 
  • #18
QuantumQuest
Science Advisor
Insights Author
Gold Member
926
485
I start to read learning python until to chapter 4. I think it has unnecessary details for me and it takes too long to express the ideas. Like if statements starts at page 371 ? I ll start to read think python it seems more nice and giving just the core ideas or details. Like Learining python would be good if someone studying a computer engineering but I dont think I would need such detailed description.
As I said in post #15 Learning Python starts from the very fundamentals and builds things up at a relatively slow pace but it has a wealth of knowledge and you can always skip things you know and go to what is unknown / more interesting to you. I did this recommendation because as you have said you are at the beginner level. Think Python is also a good book and if you find that it fits better your learning objectives / style then it is a good choice for sure. Also, you can take a look at A Python Book: Beginning Python, Advanced Python, and Python Exercises. I think that you'll find some useful stuff in it.
 
Last edited:
  • Like
Likes Arman777

Related Threads on Python -- recommended books

Replies
14
Views
5K
Replies
4
Views
2K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
2
Views
4K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
1
Views
3K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
4
Views
919
  • Last Post
Replies
1
Views
3K
  • Last Post
Replies
0
Views
2K
Top