DEV Community

Cover image for Python Variables Scope Global Keyword |Local Variables
Learn Coding
Learn Coding

Posted on

Python Variables Scope Global Keyword |Local Variables

What is Variable in Python and How to Create Variables in Python
Python in Variable: It is a name of storage space which is used to store data. Its value may be changed. It always contains the last value stored to it. There is no need to declare a variable in python. A variable is created by assigning a value to it.

Variable is a name which is used to refer to a memory location. Variable also known as identifier and used to hold value.

In Python, we don't need to specify the type of variable because Python is a type infer language and smart enough to get variable type.

Variable names can be a group of both letters and digits, but they have to begin with a letter or an underscore. It is recommended to use lowercase letters for variable name. and x both are two different variables.
Read More

Top comments (0)