LoginSignup
0
0

More than 3 years have passed since last update.

fstring

Posted at
a = 'a'
print(f'a is {a}')

x, y, z = 1, 2, 3
print(f'a is {x}, {y}, {z}')
print(f'a is {z}, {y}, {x}')

name = 'Taro'
family = 'Tanak'
print(f'My name is {name} {family}. Watashi ha {family} {name}')

実行結果:

a is a
a is 1, 2, 3
a is 3, 2, 1
My name is Taro Tanak. Watashi ha Tanak Taro
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0