MohsinIntazar
Python

Python Basics

So, you have decided to learn Python and you don't have any prior knowledge to any language then you are on the right place.

In order to learn Python we are going to do it in steps, each chunk is going to get you on the next level of the language. You just have to follow along and have faith in yourself that you can do it and most importantly practice for it as much as possible. Learning a new language is not an easy task but it is also not humanly impossible to do.

Learning any language

In order to learn any language you should try to understand few fundamentals involved which includes:

      Terms
      Data Types
      Actions
      Best Practices

Terms:

In every language we got different terms which refers to some specific words and their definitions. In order to understand  a language we should get familiar with those terms and their definitions within the language itself.

Data Types:

In simple words its just type of data that can be stored in this language which includes the following types.

  • Fundamental Data Types:
    • int
      • This stores any integer for example 2, 4, 5, 10, 100000, etc.
      • We can perform arithmetic operations upon them for example add, subtract, multiple, divide, etc.
      • Integers take less memory to store as compared to floating point numbers.
    • float
      • This stores a floating point number or decimal numbers for example 2.4, 10.9, etc.
      • They take more memory space to store as compared to integers because the part before the decimal and after the decimal is going to be stored separately in binary code.
    • bool
    • str
    • list
    • tuple
    • set
    • dict
  • Classes
  • None
  • Specialized Data Types

Actions:

Every language consists of some input which a users provides to it and then it retrieves some output and finally perform some action upon it.

Best Practices:

There is always a way to do something and a better way to do the same thing. So, in best practices we are going to learn how to write an efficient and good code to perform something in Python.