What is a Variable in Python? Rules and Examples

Task4 variable in python 🔹 What is a Variable in Python? A variable in Python is like a container that stores data (a value). It gives a name to the data so you can use it later in your program. 🔹 Rules for Variables in Python: Must start with a letter or underscore (_). (❌ cannot start with a number). Can contain letters, numbers, and underscores. Example: my_var, age1, _name. Case-sensitive → age and Age are different. Should not be a Python keyword (like if, while, for, etc.). #Python #PythonProgramming #Coding #Programming #Developer

  • text

To view or add a comment, sign in

Explore content categories