Python Basics: Variables in Python

Pubblicato il: 04 dicembre 2019
sul canale di: 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-...


In questa pagina del sito puoi guardare il video online Python Basics: Variables in Python della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Hello World 04 dicembre 2019, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 43 volte e gli è piaciuto 1 spettatori. Buona visione!