반응형 f-strings1 Python f-strings (Keep updating) Python supports string formatting three different ways. 1. %-formatting 2. str.format() 3. f-strings I have used str.format() to print data so fat but I change my mind after knowing f-strings formatting. name = 'Ethan' age = 32 print (f'My name is {name} and I am {age} years old.') name = 'Ethan' age = 32 print (f'My name is {name} and I am {age} years old.') The f-strings formatting sytax is f .. 2020. 4. 4. 이전 1 다음 반응형