我知道我們可以在字符串之前使用r(原始字符串)和u(unicode)標誌來獲得我們實際需要的內容。但是,我想知道這些如何處理字符串。我在空閒試過這樣: a = r"This is raw string and \n will come as is"
print a
# "This is raw string and \n will come as is"
help(r)
# ..... W
請看下面的演示腳本: # -*- coding: utf-8 -*-
from __future__ import division
from __future__ import unicode_literals
def myDivi():
"""
This is a small demo that just returns the output of a diviso