python基本数据类型操作总结

ゝ一世哀愁。 2024-04-17 17:51 142阅读 0赞

一:list

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

二:dict

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

三: tuple

  1. count
  2. index

四: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()

五:str

  1. capitalize()
  2. encode()
  3. format()
  4. isalpha()
  5. islower()
  6. istitle()
  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. isprintable()
  20. join()
  21. maketrans()
  22. count()
  23. find()
  24. isalnum()
  25. isidentifier()
  26. isspace()
  27. ljust()
  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()

发表评论

表情:
评论列表 (有 0 条评论,142人围观)

还没有评论,来说两句吧...

相关阅读

    相关 Python 基本数据类型

    目录   数据类型 整数 浮点数 字符串 布尔值 空值 序列 sequence 序列 空序列 元素的引用 其他引用方式 尾部元素引用 字符串是元组