1、获取对象的类型,通过 dir(类)
eg:
a = ‘abc’;
print(type(a));
执行得到类型 str
dir(str); 后即可查看str的所有方法名称。
Python 了解 类中方法的方式
2、获取对象的类型,通过 help(类)
eg:
a = ‘abc’;
print(type(a));
执行得到类型 str
help(str); 后即可查看str的所有方法名称及说明
Python 了解 类中方法的方式

3、输入类名称+‘.’等待加载支持的方法
4、输入类名称+‘.’+方法名称后,点击方法查看详细

相关文章:

  • 2021-09-17
  • 2021-10-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-16
  • 2021-09-13
  • 2022-12-23
相关资源
相似解决方案