1. String to remove whitespace, strip (), including spaces, tab, line break
" Frank ">>> name.strip ()'Frank'
2. Splitting of the string, split ("delimiter"), grouped into a list
" Apple, Banbana, Orice ">>> name.split (",") ['Apple' ' Banbana ' ' Orice ' ]>>>
3. Merge Join for string ("connector")
>>> name = ['Frank''Marlon'Lee ' ]"| " . Join (name) ' frank| marlon| Lee'
4. Determine if the space is a substring of "in"
" Frank Bain " "' inch nametrue " L " inch Namefalse>>>
5. Two kinds of string format print formats format
#The first method of presentation>>> msg ="Hello {Name}, your age was {age}">>> Msg.format (name="Frank", age=24)'Hello Frank, your'>>>#the second method of presentation, note that index starts from 0>>> msg ="hello{0}, your age was {1}, sex is {2}">>> Msg.format ("Frank", 24,"Mans")'Hellofrank, your age was, sex is man'>>>
6. The judgment of the string
>>> name ="Frank">>>Name.upper ()'FRANK'>>>Name.lower ()'Frank'>>> Name.startswith ("F") True>>> Name.endswith ("k") True>>> Name.endswith ("a") False
Python data Type---string