작성
·
198
0
multi_str2 = \
'''
문자열 멀티라인
역슬래시(\) \
테스트
'''
print(multi_str2)
출력하면 4번째 줄의 마지막 \가 무슨 역할을 하길래
문자열 멀티라인 역슬래시(\) 테스트
이렇게 출력되는건가요?
답변 2
0
0
안녕하세요. DYR.P 님
\ 멀티라인으로 원래 한 줄에 코드를 써서 표현하는 것을 다음라인으로 연속에서 작성할 때
사용합니다.
In Python strings, the backslash "\" is a special character, also called the "escape" character. It is used in representing certain whitespace characters: "\t" is a tab, "\n" is a newline, and "\r" is a carriage return. Conversely, prefixing a special character with "\" turns it into an ordinary character.