Python輸出原始字符串(不轉義)

使用repr函數

ent = "here is a book.\n"
print(repr(ent)) # "here is a book.\n"
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章