python string
- declare: string
- example:
"""abc"""
r"abc"
'<' + word*5 + '>'
"Äpfel".encode('utf-8')
'Hello\u0020World !'
str1.strip()
- concat: "abc" + 'cde'
- substring:
word[4]
word[0:2]
word[:2]
word[2:]
word[-1]
word[-2:]
- compare equal: str1 == str2
- compare order: str1 <= str2
- search:
str1.find(str2 [, start [, end]])
str1.index(str2 [, start [, end]])
str1 in str2
- replace: str1.replace(oldstr, newstr [, count])
- split: str1.split(",", limit)