#Python(045)取消逸出字元r

str1 = 'A說:早安阿\nB說:你好呀'
print('str1沒用字元r的輸出:')
print(str1)
print('\n')

str2 = r'A說:早安阿\nB說:你好呀'
print('str2有用字元r的輸出:')
print(str2)

 

結果為:

image

arrow
arrow
    創作者介紹
    創作者 愛學習 的頭像
    愛學習

    愛學習

    愛學習 發表在 痞客邦 留言(0) 人氣()