Python Basics: Variables in Python

Published: 04 December 2019
on channel: Hello World
43
1

Let us think that variables are just like an empty box. So whenever you keep something in the box after some time if you check the box again it will show you the same thing you put into it. Similarly, if you assign a value to a variable it is going to show you the same value if referenced anywhere in the program (If the content of the variable is not changed).

Few cases not allowed by python while declaring a variable:
1. we cannot start a variable name with a number
2. we cannot start a variable name with special symbols (Ex. +, -, =, etc.)
3. we cannot use void space between the variable name
4. variable name can only contain alpha-numeric[A-Z, a-z, 0-9] characters and underscores [_]

Here are a few links if you want to explore more on this topic:

W3Schools: https://www.w3schools.com/python/pyth...
TutorialsPoint: https://www.tutorialspoint.com/python...
Geeks for geeks: https://www.geeksforgeeks.org/python-...


On this page of the site you can watch the video online Python Basics: Variables in Python with a duration of hours minute second in good quality, which was uploaded by the user Hello World 04 December 2019, share the link with friends and acquaintances, this video has already been watched 43 times on youtube and it was liked by 1 viewers. Enjoy your viewing!