tldr; official python docs
Unlocking the door to knowledge requires the right keys: curiosity, persistence, and a sprinkle of passion. Learning isn't a task, it's an adventure waiting to be embraced.
Python being one of the most used language in programming is surprisingly one of the easiest to learn as well.
Before we start, we need to set you up with your Python interpreter as well as the IDE you will be using.
Installation
Windows Users
Go to https://www.python.org/downloads/ and find the version that fits you (or is required for your project/company). If you are looking for the latest version then the Download Python 3.12.0 is all you need to get started.
After downloading the setup you need to install it on your PC.
I recommend checking the checkbox that asks you to add python to PATH variable.
Linux Users
Python is already installed in Linux but usually it's the Python2 instead of the new Python3
Although, you can use the terminal to install the latest version as well. on Ubuntu it is.
sudo apt-get update
sudo apt-get install python3.12
MAC Users
In general, the Mac OS x systems have already installed a version of python, which can be used.
Use this official website to download python.
If you want another, you can use brew.
brew install pyenv
pyenv install 3.12.0
NOTE: Most of the time you don't really need to use the terminal to install python and you can get away with it using the python.org website itself.
Which IDE?
IDK Just use whatever you like...
Personally, I use VSCode. Don't ask why. I just use it.
If you really are serious about Python then maybe it's better to choose a good IDE from the start and use that and learn its shortcuts since shortcuts help you speed up your productivity a lot than what you think it does.
Following are some of the IDEs out there.
- Visual Studio Code
- Pycharm
- Spyder
- Thonny
Reading Material
Official Python Documentation
Nothing is as good as the documentation of python itself. It is slow paced and teaches everything there is in python properly.
Python Playground
Maybe you are not into just plain text reading and you want some practice while you learn. For that you can use the following link. It has a playground feature where you can practice with an online interpreter as well.
https://www.learnpython.org/
Liquid error: internal
Lecture Material
YouTube
YouTube is filled with multiple videos that teaches you python, Some being 12 hours long while some takes only 100 seconds. Personally i recommend looking into this
Paid Courses
One of the best paid python Specialization out there.
Further Advancing in Python
Python is all about its library so learning how to use in-built libraries is a plus. I will recommend you to learn libraries like asyncio, math, datetime, time, hashlib, itertools, functools and unittest can greatly help you with your Competitive Programming or open source career.
Refer to the following link for official documentation on in-built libraries.
Learn how to install external libraries using pip from here.
Something quite important when it comes to programming is learning how about Data Structures and Algorithm. Although, I wonโt recommend python for CP.
Practice Practice Practice...
Without practice you wonโt be able to remember what you learnt. You can look into GitHub for open-source projects to contribute into to improve your documentation and unit testing skills or you can look into the following websites to practice via problem questions.
Codewars: Good for both beginners as well as professionals. The website is filled with many questions and you can practice and get better in python using the website.
CodeBat: Code practice website. Quite basic but gets the job done.
I personally donโt recommend leetcode or hackerrank until you have completed DSA.
After all this, the journey in python isnโt still completed. There is a lot to learn even now. Mainly domain specific libraries.
I am a python developer with over 4 years of experience. You can find me here
Top comments (7)
Thank you so much for this! I wish I had this when I first started out but I am still pretty new enough so thank you so much, this will come in handy!
I am happy that it helps! If you need further assistance, feel free to contact me anytime!
Thank you, I appreciate it!
Your linktree is dead. Thanks for the writing.
Oh I am really sorry. I just noticed!
I think it works now.
Thanks, good article!
Thanks for the appreciation!