Hey !! Welcome to a very short and quick tour to Python. As I am keeping it really short to make it a read of not more than 10–15 minutes, so I will be jumping directly into the concepts and the topics Python has.

Why Python?

  • Very simple to learn.

Keywords In Python :

In very simple words, Keywords in Python are the reserved words for python.

  • So there are total 35 keywords in python 3.8.5.

Indentation in Python

In Python we don’t have that curly braces which we use in C,C++ or Java. Here we use indentation which is 4 spaces.

Data Types

Everything in Python has a datatype. Everything in python is an object. Datatype are classes and variables are instance(object) of these classes.

isinstance() function can be used to verify the datatype of any variable.

Strings in Python

  • Simply string is a sequence of Unicode characters.

Python List

  • List are the super flexible datatype in Python.

Python Tuple

  • The only difference between tuple and list is that tuples are immutable and lists are mutable.

Python Set

  • Sets are the unordered collection of unique items.

Python Output

The are different approaches to print the output in Python.

Python Input

In python we have input function to take input from the user.

Operators in Python

Control Flow if…else Statement

  • If else statement is used for decision making.

While Loop

The loop will be operated as long as the condition we have passed is true.

Also we can add else after a while loop. If the condition inside while fails it will be executed.

For Loop

Like other programming languages for loop works exactly same in python also.

We take a variable which iterates over the given range. Lets understand with the example.

i is being iterated from 0 to 9 and got printed every time. i is being initialised with 0 then checked if it is less than 10 or not? then 0 got printed and then i got incremented by 1, then got checked if it is less than 10 or not? then it is printed again. And the same process will run unless the condition is false.

For loop in List :

Instead of using range we just use the name of the list and python will iterate through the complete list.

In Basic Python we have two more keywords which we should discuss under the loop section.

Break and Continue

Let us see one example to understand the concept of using break.

After using break we have jumped out of the loop immediately.

Using continue inside the loop will skip all the step written below ‘continue’ and proceed towards incrementing the iterator and then loop continues.

Wow! Congratulations you have just gone through the basics of Python. Now you can grow your more knowledge by solving problems, learning about Data Structures in Python. You can proceed towards learning Web Development Frameworks, Machine Learning etc.

Happy learning! Keep growing.
Support each other to grow!

Thanks for Reading :)

Python || Machine learning || Deep Learning || Data Science.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store