>>> import requests
>>> hasattr(requests,'get')
True
>>> hasattr(requests,'aaa')
False
说明requests模块有get方法,没有aaa方法
转载于:https://blog.51cto.com/9425473/1766087
>>> import requests
>>> hasattr(requests,'get')
True
>>> hasattr(requests,'aaa')
False
说明requests模块有get方法,没有aaa方法
转载于:https://blog.51cto.com/9425473/1766087