python - 怎样防止对字符串变量的转义
PHP中文网
PHP中文网 2017-04-18 10:16:29
0
1
533

例如

temp1 = "\t"
temp2 = r"\t"
print repr(temp1)
print repr(temp2)

输出:
't'
'\t'

有什么能对temp1用的方法可以让print repr(temp1)的结果和print repr(temp2)一样么

PHP中文网
PHP中文网

认证高级PHP讲师

répondre à tous(1)
洪涛

Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!