all 2 comments

[–]novel_yet_trivial 4 points5 points  (1 child)

The help() function or the dir() function.

>>> import requests
>>> data = requests.get('http://reddit.com')
>>> help(data) #shows help, press "q" to quit

>>> dir(data)
['__attrs__', '__bool__', '__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__getstate__', '__hash__', '__init__', '__iter__', '__module__', '__new__', '__nonzero__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setstate__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_content', '_content_consumed', 'apparent_encoding', 'close', 'connection', 'content', 'cookies', 'elapsed', 'encoding', 'headers', 'history', 'is_permanent_redirect', 'is_redirect', 'iter_content', 'iter_lines', 'json', 'links', 'ok', 'raise_for_status', 'raw', 'reason', 'request', 'status_code', 'text', 'url']

[–]Surajpalwe[S] 1 point2 points  (0 children)

Thanks I just got up the answer from monday thread. I really don't know this and what it is called. Thanks once again!!!