I need help learning Python in an efficient and in-depth way, any tips?
Posted by Pessoa_2D@reddit | learnprogramming | View on Reddit | 11 comments
I have a research project for my undergraduate degree that will require a lot of Python and data science (I'm studying physics), mainly for plotting spectra and doing PCA. In short, I need to learn Python, I don't want to rely on AI to learn (even though it's useful), I really want to know what I'm doing. I've already used Fortran and C, but nothing beyond the basics.
What would be a good way to learn, or some cool material ?(Preferably not books because I'm blind)
dyslechtchitect@reddit
Sounds like codewarz is the one for you - quick code exersizes you can do until python becomes your native toung - highly recommended.
Just_Jaguar3701@reddit
i dont think you will have to learn python itself but its abstraction, since you know c you will just to learn python syntax which isnt going to be that hard or confusing since u coded in low level (relatively) so googling some stuff like how python handles classes and maybe some libraries that ease that procedure wont be that bad as a learning process
BeginningOne8195@reddit
Since you already know some C and Fortran, you’ll probably pick up Python faster than you think, honestly the best way is to learn directly through small physics/data projects instead of trying to study everything separately first.
Educational_Set_8808@reddit
Go on GitHub (or other similar like GitLab) and read people's small project code (not the big ones). When I wanted to learn, I would read other people's projects, then maybe go through and write it and interact with it. Don't just passively read but actively make a project on your own.
Designer-Flounder948@reddit
For your use case, I think interactive/video-heavy resources will probably help much more than traditional books anyway. Since you already have programming exposure, you do not need beginner what is a variable material for long
Beneficial-Panda-640@reddit
Since you already know some C and Fortran, you’re probably closer than you think. I’d focus less on “learning Python” broadly and more on learning the scientific stack through actual small projects. NumPy, pandas, matplotlib, and scikit-learn will cover a huge amount of what you described.
Also, writing scripts to analyze your own physics data tends to make the concepts stick way faster than tutorials alone.
DonkeyTron42@reddit
Just use Claude
Dry_Budget_5961@reddit
Physicist here. Just dive into projects—plotting spectra or PCA will teach you way faster than tutorials. Start with numpy and matplotlib docs, they're actually readable.
opentabs-dev@reddit
since you said no books, mit 6.0001 (intro to python) and cs50p are both full youtube lecture series, totally audio-friendly and they actually teach you the language not just syntax. given your background in fortran and c the basics will fly by, you can probably skip the first 3-4 lectures.
for the actual project you don't need a giant python curriculum, you need numpy + matplotlib + scikit-learn. real python (realpython.com) has audio-readable tutorials specifically on those, and the official numpy quickstart is short. for PCA the sklearn docs page literally walks through the whole thing with example data, so once you can read/write a numpy array and call a function you're already 80% there.
one tip from the c/fortran side: stop thinking in loops. if you're writing
for i in range(len(arr))you're doing it wrong, vectorize with numpy. that mental shift is the single biggest unlock when you come from c.grantrules@reddit
I assume ebooks are fine?
https://programming-26.mooc.fi/
https://automatetheboringstuff.com/
https://inventwithpython.com/invent4thed/
https://www.py4e.com/book
Fun_Tradition_6905@reddit
good start