Content-Length: 41144 | pFad | http://www.thepythoncode.com/code/print-variable-name-and-value-in-python

Code for How to Print Variable Name and Value in Python - Python Code

Code for How to Print Variable Name and Value in Python Tutorial


View on Github

print_variable_name_and_value.py

# Normal way to print variable name and value
name = "Abdou"
age = 24
print(f"name: {name}, age: {age}")

# using the "=" sign
print(f"{name=}, {age=}")










ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://www.thepythoncode.com/code/print-variable-name-and-value-in-python

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy