Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("hello, your name is [name]")
- print("hello, your name is "+name)
- >>> name = 'Jake'
- >>> print('hello %s, have a great time!' % name)
- hello Jake, have a great time!
- >>> print('hello {}, have a great time!'.format(name))
- hello Jake, have a great time!
- >>> print('hello ' + name + ', have a great time!'.format(name))
- hello Jake, have a great time!
- >>> print(f'hello {name}, have a great time!')
- hello Jake, have a great time!
- print(f"hello, your name is {name}")
- print('Hello, my name is {0}, and here is my name again {0}'.format(name)'
- print(f'your name is {name}')
- print('your name is {}'.format(name))
- >>> print("%s, your name is %s" % ('hello', 'name'))
- hello, your name is name
Add Comment
Please, Sign In to add comment