본문 바로가기
Programming/Python

[python]문자열에 double quotes 추가 하는 방법

by 빅경 2024. 6. 19.
728x90
반응형

How to append double quotes to a string and store as new string?

a = "Hello World"

# Beautiful usage in python
b = '"{}"'.format(a)

# in python 3.6 (or above)
b = f'"{a}"'
728x90
반응형