Python basic data type operation summary

One: list

  1.   append
  2.   count
  3.   insert
  4.  reverse
  5.   clear
  6.   extend
  7.   pop
  8.  sort
  9.  copy
  10.   index
  11.   remove

Two: dict

  1.   clear
  2.   get
  3.  pop
  4.   update
  5.   copy
  6.   items
  7.  popitem  values
  8.   fromkeys
  9.   keys
  10.   setdefault

Three: tuple

  1.  count
  2. index

Four: set

  1.  add()  
  2.  difference_update()
  3.  isdisjoint ()
  4.  clear()                      
  5.  discard()                    
  6.  issubset()
  7.  copy()                        
  8.  intersection()                
  9.  issuperset()                           
  10.  difference()                  
  11.  intersection_update()        
  12.  pop()

Five: str

  1.  capitalize()  
  2. encode()      
  3. format()      
  4. isalpha ()      
  5. islower()      
  6. list ()      
  7. lower()       
  8. casefold()    
  9. endswith()    
  10. format_map()  
  11. isdecimal ()    
  12. isnumeric()    
  13. isupper()    
  14.  lstrip()       
  15. center()      
  16. expandtabs()  
  17. index()      
  18.  isdigit()      
  19. printable ()  
  20. join()        
  21. maketrans()    
  22. count()        
  23. find()        
  24. isalnum ()      
  25. Identifier ()
  26. isspace()    
  27.  light()        
  28. partition()
  29. replace()    
  30. rpartition()  
  31. splitlines()  
  32. title()
  33. rfind()      
  34. rsplit ()      
  35. startswith()  
  36. translate()
  37. rindex()      
  38. rstrip()      
  39. strip()        
  40. upper()
  41. rjust ()        
  42. split()        
  43. swapcase()    
  44. zfill()

 

 

 

 

Guess you like

Origin blog.csdn.net/wjg1314521/article/details/100139429