print variabl code example
Example 1: print variable string python
>>> print("foo", "bar", "spam")
foo bar spam
Example 2: python print variable
name = "Bob"
print(f"hello {name}!")
>>> print("foo", "bar", "spam")
foo bar spam
name = "Bob"
print(f"hello {name}!")