Knowledge Learning python

** indicates deep calculation
// represents division rounding
\ represents escape
r "" can be used to avoid escape

  • For the string attached to
    the string * copy number indicates the number of string
    variables [0] represents the variable in the first one, [1] for the first two
    variables [-1] represents a variable in the penultimate one, [ -2] is the inverse of the second
    endsWith () expressed in xx end
    startsWith () represented by xxx beginning
    isdigit () if string contains only numeric was True, otherwise to False
    len () returns the string length
    lower () converts characters string in all uppercase letters to lowercase
    replacement string the replace (Old, new new)
    rstrip () delete the end of the string of blanks
    upper () converts a string of lowercase to uppercase
    append () to add list items
    list.append () end of the list add a new object
    list.sort () to sort the list
    list.clear () Clear list

Guess you like

Origin blog.51cto.com/yangzhiming/2436948