May-02-2017, 11:50 AM
(May-02-2017, 09:42 AM)Mekire Wrote:in Python 2.7 it will work that way, in 3.x>>> >>> vars(a).keys() ['x', 'y'] >>>
In [19]: vars(p).keys() Out[19]: KeysView(OrderedDict([('x', 4), ('y', 5)])) In [20]: list(vars(p).keys()) Out[20]: ['x', 'y']
Test everything in a Python shell (iPython, Azure Notebook, etc.)
- Someone gave you an advice you liked? Test it - maybe the advice was actually bad.
- Someone gave you an advice you think is bad? Test it before arguing - maybe it was good.
- You posted a claim that something you did not test works? Be prepared to eat your hat.