Hi, I'm mithushan. In this blog I am writing what I learn from online or other resources.

Friday, December 31, 2021

Variables in Python

Variables in Python Programming

In programming , a "variable" is a container that stores the value of data in the system's memory. The saved value can be specified using the variable name. Data stored in a variable is assigned to the Python program notification statement = assignment operator.

Eg : x = 2021

  • A variable name cannot start with a number
  • A variable name must start with a letter or the underscore (_) character
  • A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _)
  • Variable names are case-sensitive

Source code
  
  x = 2021

  print ("Welcome ", x )

Output

Welcome  2021



No comments:

Post a Comment