x = 'Hello World
x.upper() = 'Hello World -> 'HELLO WORLD'
x.lpper() = 'Hello World -> 'hello world'
x.split() = 'Hello World -> 'Hello', 'World'
x.split('l') = 'Hello World -> 'He', 'l', 'l', 'o Wor', 'l', 'd'
print('This is a string {}'.format('inserted')) -> 'This is a string inserted'
print('The {2} {1} {0}'.format('fox', 'brown', 'quick' )) -> 'The quick brown fox'
print('The {q} {b} {f}'.format(f='fox', b='brown', q='quick' )) -> 'The quick brown fox'
print('The {q} {b} {f}'.format(f='fox', b='brown', q='quick' )) -> 'The quick brown fox'
Float formatting은 "{value:width.precision f}"를 따른다.
result = 100/777 -> 0.1287001287001287
print("The result is {r:1.5f}".format(r=result)) -> The result is 0.12870
만약 result = 104.12345 그렇다면
print("The result is {r:1.5f}".format(r=result)) -> The result is 104.12345
name = Junyeong
age = 28
print(f'Hello, my name is {name}')
print(f'{name} is {age} years old')