python programming language variable declaration | how to declare variables in Python | Python

Published: 28 February 2022
on channel: go4awsclouds
219
1

how to declare variables in Python
#variables in python in English
#naming convention for variables in python
In this video, I am going to explain how to declare variables in Python and rules for defining the python variables. How to define naming convention for python variables. This video is use full for python beginners.
Rules for defining a variable in python are:
1. Variable name should contain alphanumeric and underscore (_)
2. Variable name shouldn't start with number.
3. variable should start with a character or underscore(_).
4. Variable names are case sensitive i.e myVar and MYVAR are two different variable.

Variable definition: variables in python are memory location which are used to hold a value.
There are two different types of variables in Python.
1. local variable
2. Global variable.

How to assign variables in python.
using assignment operator (=) , we can assign values to variables in Python.

Example for declaring variables in Python.

a=10
print (a)
here the print statement is used display value of python variable.

In this program we explained How to define rules for Python variables.


On this page of the site you can watch the video online python programming language variable declaration | how to declare variables in Python | Python with a duration of hours minute second in good quality, which was uploaded by the user go4awsclouds 28 February 2022, share the link with friends and acquaintances, this video has already been watched 219 times on youtube and it was liked by 1 viewers. Enjoy your viewing!