#Python(045)取消逸出字元r
str1 = 'A說:早安阿\nB說:你好呀'
print('str1沒用字元r的輸出:')
print(str1)
print('\n')
str2 = r'A說:早安阿\nB說:你好呀'
print('str2有用字元r的輸出:')
print(str2)
結果為:
文章標籤
全站熱搜
#Python(045)取消逸出字元r
str1 = 'A說:早安阿\nB說:你好呀'
print('str1沒用字元r的輸出:')
print(str1)
print('\n')
str2 = r'A說:早安阿\nB說:你好呀'
print('str2有用字元r的輸出:')
print(str2)
結果為:
留言列表