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=}")


pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy