print formatted string in python code example Example: formatted string in python >>> name = "world" >>> print(f"Hello {name}!)" 'Hello world!'