python2和python3的dict
将object转换为dict
vars([object]) -> dictionary
python2 dict
1 | m_dict = {'a': 10, 'b': 20} |
python3 dict
1 | m_dict = {'a': 10, 'b': 20} |
输出:
vars([object]) -> dictionary
1 | m_dict = {'a': 10, 'b': 20} |
1 | m_dict = {'a': 10, 'b': 20} |
输出: