Python is the top programming language by popularity. It is also a relatively easy language to learn, with an easy syntax. It is useful in various areas, including artificial intelligence. Python is taught in various stages in schools, usually in high school and different school clubs.
Elementary school kids can also learn Python with a little effort. This blog post gives a timeline or roadmap on the sequence for children to learn Python. The recommended ages are 10 and above. There are always outliers -- for example, in my experience, a 9-year old elementary school student may learn Python faster than a college student who may find Python intimidating or difficult to learn.
This blog post is not a tutorial on how to set up Python on your computer or how to code in Python. This is only a roadmap for learning core Python basics in 30 days.
Install Python 3.11 or 3.10, the most recent version is preferable. Preferred editors and IDEs are Visual Studio Code with Python plugin and Sublime Text.
Write a simple Hello World program and make sure it executes.
Learn the basics about Python variables, operators and basic data types -- int, float, str, bool, None, list. Practice with a little of each. You will be working on these in-depth later.
Learn more data types -- complex, tuple, set, frozenset, range, dictionary, bytes, bytearray. Practice with a couple examples for each data type.
More operators -- Arithmetic, Assignment, Comparison, Logical, Identity, Bitwise and Membership operators. Practice.
Learn about blocks, and conditional statements
if along with
continue. Learn about nested
if statements. Practice.
Also, practice using the
bool data type.
for loops. Practice.
while loops. Practice.
Learn more about strings. Learn and practice using various string operations.
Also, learn string formatting using the
format() method and f-strings.
Learn more about lists and list operations. Learn about tuples as well. Practice.
Learn about iterators and how to use
Learn more about dictionaries. Learn and practice using various dictionary operations. Pay special attention to methods such as
Learn more about sets and frozen sets. Practice.
Learn how to create lists from dictionaries and using the
At this point, if you are comfortable about lists and dictionaries, practice with exercises that use lists of lists, lists of dictionaries and dictionaries of lists.
Learn how to convert string to bytes, and bytes to string.
In particular, the
decode() method and
Learn about functions and modules in Python. Learn how to call existing functions and create new functions. Learn about arguments and how to pass them.
Learn about arbitrary arguments args and keyword arguments *kwargs.
Learn about named arguments.
Learn about the
main() function in Python.
Learn about local scope and global scope.
Learn about recursion and practice it.
Learn about lambda in Python. Practice.
reduce. Learn about list comprehension too. You will be using more of list comprehension.
Learn about exception handling in Python.
Learn about creating and reading JSON objects in Python. Convert between JSON and dictionaries.
Learn about file handling in Python. Learn and practice reading a file, writing to a file, appending to a file.
Practice more file handling and file operations exercises.
Learn about regular expressions in Python. Spend as much time as you can with this.
Practice more regular expressions.
Learn the concept of object-oriented programming in Python. Practice the PIE concepts -- polymorphism, encapsulation and inheritance.
Practice more object-oriented examples with Python.
Learn about Python's new
pip and install the
requests package with:
pip install requests
requests package and practice using it to make remote HTTP calls. Practice retrieving the IP address from
https://api.aruljohn.com/ip in plaintext format and from
https://api.aruljohn.com/ip/json in JSON format.
Practice more with
requests and learn how to use sessions. If you are feeling adventurous, install and try
Learn how to use the built-in functions such as
type(), and other methods.
Learn how to use dates in Python using the
Learn the various math functions. Also, install the
math module and practice as many
math functions as you can.
Work on a small project that should take you a couple of days .
Make sure it has an input file to read from, regular expressions, making remote HTTP calls, parsing the response as JSON, formatting the response and printing the result. Get creative with your self-defined question if you cannot find one. Or contact me and I can give you project ideas.
Learn about multithreading. Practice an example using multithreading.
Learn about making asynchronous http requests using
aiohttp. Practice an example using
Everyone's timeline is different
Everyone's timeline is different. For some, this 30-day timeline may be too basic. For others, this may be complex.
The trick is to adapt this timeline to suit your own pace and convenience. You may find a few topics easy and other topics harder to master. It is totally fine. Just learn the topics gravitate and learn naturally. Good luck on your Python journey!
What you have learned after these 30 days of Python is a little more than core Python. After this, you can improve on it by practicing Python on HackerRank, LeetCode and other online competition websites.
If you want to progress to a specific field, you can move on to learning new modules and packages to work with data science, web development, automation, scraping, data analytics, machine learning, artificial intelligence and a lot more. On this website, you will find code samples. In addition, I will be posting more code samples regularly. If you have any requests for code samples, please email me.
If you have any questions, please contact me at arulbOsutkNiqlzziyties@gNqmaizl.bkcom. You can also post questions in our Facebook group. Thank you.