본문 바로가기
Python 배우기

character_escaping.py

by 노화방지 Anti-aging Hairstyle 2016. 3. 6.
반응형
dont_worry = "Don't worry about apostrophes"
print(dont_worry)
print("The name of this ice-cream is \"Sweeet\"")
print('text')

산출물 (Output)
Don't worry about apostrophes

The name of this ice-cream is "Sweeet"

text



Backslash is used to escape single or double quotation marks, for example 'It\'s me' or "She said \"Hello\"".

The special symbol '\n' is used to add a line break to a string.


반응형

'Python 배우기' 카테고리의 다른 글

lists.py  (0) 2016.03.06
string_methods.py  (0) 2016.03.06
len_function.py  (0) 2016.03.06
in_operator.py  (0) 2016.03.06
slicing.py  (0) 2016.03.06

댓글