Variables in python

Variables:
Every variable holds a value, which is the information associated with that variable. In this case, the value is the text “Hello Python world!”
adding a new line in the file:

message = "Hello Python world!"
print(message)

Adding a variable makes a little more for the Python interpreter. When it processes the first line, it associates the text “Hello Python world!” with the variable message. When it reaches the second line,it prints the value associated with message to the screen.

Translate »