FreeKB - Variables in Python
Variables in Python

Home > Search


Creating variables in Python is incredibly easy. In this example, the variable foo contains a value of bar.

foo = "bar"

 

Printing the foo variable will show that the foo variable contains a value of bar.

print(foo)

 

You can create a new variable that is exactly the same as a current variable. In this example, the bar variable will contain the same exact data as the foo variable.

bar = foo

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter b0774 in the box below so that we can be sure you are a human.




Comments