Python Fundamentals

So until now, we have seen the python installation in our systems. Now let us start coding with python fundamentals.


Python statements are nothing, but the logical instructions that the interpreter execute. Hence the statements can be in single line (or) multi line statements.

Python statements were categorized into two statements :

python fundamentals

Expression statement and Assignment statements.

Expression statements :

The expression statements include several  operator expressions like Addition(+), Subtraction(-) , multiplication (*), division(/) and modulo(%). Probably In other words, the expression statement returns a value.

An expression is something that returns a value.

Arithmetic expressions:



Functional expression:

Every Interpreter/compiler have some predefined function like pow(), sqrt() and so on. And Python interpreter supports this tool.





Assignments statements :

These type of statements creates a variable and assigns a value to it. Hence the assignment statements logically operate and stores the results in the variable(it operates on LHS and stores on RHS).


Test1 =’I love coding’

Id (test1)

Output: 70809568

Test2=’I love coding’


Output:  70809568

If you seriously noticed the above two variables, namely test1 and test2, therefore the interpreter allocates same memory allocation for both the variables.

Want to become a master in Python visit python online training

Note :

Almost Python allocates same memory location in two cases

If the string is less than 20 characters ( white spaces were included)

Integers ranging between -5 to + 255.

RHS operations :

In this, we have some operations on RHS. Hence, Let us discuss with some examples.

Test =7*2


Output : input

Test = 7*2/10


Output: float

Comments :

So, these are nothing but the non – executable line of code. While, we have two types of comments.

Single line comments:  

The single line comments start with #

# I don’t execute

Multiple line comments :

Finally, the multiple line comments start and end with “  ”.

Would you like to know  Is python compiled or interpreted

to our newsletter

Drop Us A Query

Trending Courses
  • Pega testing training
    PEGA Testing Training
  • Today application testing is the deciding factor to launch the application into the market. And people do not launch the application unless it goes true.

  • blockchain course
    Blockchain Online Course
  • Today many people were enthusiastic, to know the exact details of things happening around him. This can get the proper knowledge on Blockchain.

  • ethical hacking course
    Ethical Hacking Certification Course
  • Zeal to learn ethical hacking is common among college students and IT professionals. Because everybody wants to secure their system from cyber attacks.

  • python training
    Python Online Training
  • Python is a dynamic interrupted language which is used in wide varieties of applications. It is very interactive object oriented and high-level programming language.

  • Tableau Training
    Tableau Training
  • Tableau is a Software company that caters interactive data visualization products that provide Business Intelligence services. The company’s Head Quarters is in Seattle, USA.

  • what is pega
    PEGA Online Training
  • Pega Systems Inc. is a Cambridge, Massachusetts based Software Company. It is known for developing software for Customer Relationship Management (CRM) and Business process Management (BPM).

100% Secure Payments. All major credit & debit cards accepted.