Variables in Python.

 Variables

Variables are temporary Storage spaces. In Python we can always reassign a variable.
Python uses dynamic typing that means it can reassign variable name to different data types.


Variable assignment in Python:

note : Following code is executed in Jupiter notebook.
note : To run particular cell in Jupiter Notebook press SHIIFT + ENTER.
note : We can check type of a variable using type keyword in Python.

We can assign variable in python as follows:
syntax:
 var_name = value




In above example student variable is assigned to two different data types.




Comments

Popular posts from this blog

Introduction to Python Programming

Lists in Python