How to learn Python (Step by Step guide) | Python CONCEPTS to learn

If you are new to programming and you plan to get started with Python then one of the first questions you would ask yourself is "How to learn python?" i.e. what are the different python programming concepts you need to learn?

Also depending on your field of interest i.e. whether you want learn python for web development or data science or automation etc, you may have to learn some additional concepts.

That is why, in this blog, I will provide a step by step guide to all the concepts that you need to cover to learn python fundamentals and also the concepts you need to learn specific to different fields. You will also find few resources that can help you to learn these concepts. Let’s BEGIN…

P.S. Python has hundreds and thousands of different concepts and almost no one uses all the available features. The idea of this blog is to help beginners to get an idea of what are most essential concepts you need to learn to start working on projects. Of course, this will not include each and every available python concept.

 

1. Why do you want to learn python?

Before you start learning, first ask yourself, what is the purpose of learning python? Which field are you focusing on?

Because python is used in so many different fields, you may have to learn different things depending on the field you choose. So identifying which is your field of interest can help you to focus on learning only the things required for that field. Popular fields using python are:

  • Data Science

  • Machine Learning & AI

  • Web Development

  • Automation

  • Game Development

  • Mobile App development

Once you know what you will be using python for, we can now see all the different concepts you need to learn.

 

2. Learn Python Fundamentals

No matter which field you choose, knowing the fundamentals of python programming is essential. So before you learn concepts specific to your field of interest, make sure you are comfortable with the below fundamental python concepts.

I've divided them into 3 sections i.e. Basic python, Core python and Advance python concepts. Now concepts covered under Basic python and Core python are definitely required to get thorough understanding of python programming whereas the concepts under advance section are not mandatory and they are just concepts which is good to know. So don’t bother learning the advance concepts when you are new to programming.

Part 1 - Basic Python concepts

These are the most basic programming concepts which would be present in almost any programming language and these will just get you started with knowing basic programming. However these are your foundation to programming so make sure to be comfortable with these concepts but don’t spend too much time. Ideally 1-2 weeks should be a good amount of time to learn all these concepts and also write some simple programs.

  • Expression

  • Operators

    • Arithmetic Operator

    • Comparison Operator

    • Assignment Operator

    • Logical Operator

  • Data Type

    • String

    • Integer

    • Float

    • Boolean

  • Variable

  • IF ELSE Statements

  • For Loop

  • While Loop

  • Import Statements

  • Function

  • Local and Global Scope

Resources:

Website: w3schools.com

Book:Automate the Boring Stuff with Python” - By Al Sweigart

YouTube: techtfq

Part 2 - Core Python concepts

Once you are familiar with basic python programming concepts, the next thing to focus on is data structures and other core programming concepts which will let you build some real world projects. Ideally 2-3 weeks should be a good enough time to learn all of these concepts and also build some simple projects using them.

  • Data Structures like:

    • Lists

    • Dictionaries

    • Tuples

    • Sets

  • Method related to different data types:

    • String methods like join(), split(), startswith(), endswith() etc.

    • List methods like append(), pop(), remove(), index() etc.

    • Dictionary methods like keys(), values(), items(), get() etc.

    • Tuple methods like count(), index() etc.

    • Set methods like add(), copy(), discard(), isdisjoint() etc.

  • Object Oriented Programming concepts like:

    • Classes & Objects

    • Different type of methods & variables

    • Constructors

    • Inheritance

  • Exception Handling: Using Try and Except block

  • File operations:

    • Read a file

    • Write to a file

  • Debugging in python

    • Using the logging module

Resources:

Website:

w3schools.com

python.org

Book:

Automate the Boring Stuff with Python” - by Al Sweigart

"Python Crash Course" - by Eric Matthews

YouTube:

techtfq

Coreyms

Part 3 - Advance Python concepts

Once you are familiar with basic and core python concepts, you are pretty much ready to build projects. However, if you have the time and are interested in learning some cool python features and also if you are going to need some advance concepts in your project then you can cover the following concepts too.

  • Regular Expression

  • Lambda functions

  • Comprehensions

  • Generators

  • Decorators

  • Threading and Multiprocessing

Resources:

Website:

learnpython.org

python.org

Book:

"Python Crash Course" - by Eric Matthews

"Learning Python" - by Mark Lutz

YouTube:

Coreyms

 

3. Learn Python concepts specific to your field of interest

Python is used in so many different fields. It is widely used in the fields of data science, machine learning, web development, and automation. And python can also be used for game development, mobile app development and a few other streams. For each of these fields, knowing just the fundamentals of python programming wont be sufficient. You will have to master a few frameworks or libraries to efficiently work in these fields.

Mentioned below are some of the essential concepts/frameworks/libraries you require to learn with respect to each of the above mentioned fields:

  • Data Science

    • Regular Expression

    • Web Scraping

    • Using SQL with python to work with databases

    • Learn to use following libraries:

      • Pandas

      • NumPy

      • Matplotlib

      • Seaborn

      • SciPy

Resources:

Coursera:

“IBM Data Science Professional Certificate”: coursera.org

Book:

Python for Data Analysis - by Wes McKinney

  • Machine Learning & AI

    • Learn to use following libraries:

      • NumPy

      • Pandas

      • Matplotlib

      • Scikit-Learn

      • TensorFlow

      • NLKT

      • Keras

      • Theano

      • PyTorch

    • Using SQL with python to work with databases

Resources:

Coursera:

Machine Learning by Andrew Ng: coursera.org

Book:

"Machine Learning with Python Cookbook" - by Chris Albon

"Hands-On Machine Learning with Scikit-Learn and TensorFlow" - by Aurélien Géron

  • Web Development

    • Learn python web frameworks like: (any one would do)

      • Django

      • Flask

      • Pyramid

      • TurboGears

      • Web2Py

    • Using SQL with python to work with databases

Resources:

Book:

Django for Beginners: Build Websites with Python and Django - by William S. Vincent

Flask Web Development, 2nd Edition - by Miguel Grinberg

  • Automation

    • Learn how to use following libraries:

      • Selenium

      • Requests

      • BeautfifulSoup4

      • Pandas

      • OS

      • JSON

Resources:

Book:

“Automate the Boring Stuff with Python” - by Al Sweigart

  • Game Development

    • Learn PyGame library

Resources:

Website:

pygame.org

  • Mobile App development

    • Learn any of the following framework:

      • Kivy

      • BeeWare

    • Using SQL with python to work with databases

Resources:

Website:

kivy.org

beeware.org

 

4. Build Projects

Building projects is the most essential part of learning python or for that matter any other programming language. You don’t need to build complicated projects. Start with simple projects and gradually move on to building some advanced projects.

Projects will help you to practice everything you’ve learnt and also give you the knowledge and experience of how to use these concepts in real world scenarios. Projects are also a great way to showcase your skills to potential employers.

Make sure to make you projects public either by posting them in GitHub or in Kaggle.

These projects would be very essential when you build your portfolio as well so definitely spend the most time in working on projects.

 
Previous
Previous

SQL WITH Clause (How to write SQL Query using WITH Clause)

Next
Next

Learn how to write SQL Queries(Practice Complex SQL Queries)