Python Fundamentals

Click to rate this post!
[Total: 0 Average: 0]

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
  • Selenium with python
    Selenium with Python Training
  • As we know, that Selenium with Python Web Browser Selenium Automation is Gaining Popularity Day by Day. So many Frameworks and Tools Have arisen to get Services to Developers.

  • machine learning with python
    Machine Learning with Python Training
  • Over last few years, Big Data and analysis have come up, with Exponential and modified Direction of Business. That operate Python, emerged with a fast and strong Contender for going with Predictive Analysis.

  • Data science with R
    Data Science With R Training
  • Understanding and using Linear, non-linear regression Models and Classifying techniques for stats analysis. Hypothesis testing sample methods, to get business decisions.

  • data science with python
    Data Science with Python Training
  • Everyone starts Somewhere, first you learn basics of Every Scripting concept. Here you need complete Introduction to Data Science python libraries Concepts.

  • devops with azure
    Devops with Azure Training
  • As we Know Azure DevOps is a Bunch of Services, in guiding Developers. It contains CI/CD, pipelines, code Repositories, Visual Reporting Tools and more code management with version control.

  • python training
    Python Certification 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.

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

Call Now Button