Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #54841 > unrolled thread
| Started by | Virendra Tripathi <virendra.tripathi@maansystems.com> |
|---|---|
| First post | 2013-09-26 17:13 +0000 |
| Last post | 2013-09-26 17:13 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
Re: Convert namedtuple to dictionary Virendra Tripathi <virendra.tripathi@maansystems.com> - 2013-09-26 17:13 +0000
| From | Virendra Tripathi <virendra.tripathi@maansystems.com> |
|---|---|
| Date | 2013-09-26 17:13 +0000 |
| Subject | Re: Convert namedtuple to dictionary |
| Message-ID | <mailman.361.1380215641.18130.python-list@python.org> |
Hi MRAB, Thanks. Learning a lot thanks to you guys. I should have mentioned that the data is dynamic, in the sense that 'brucelee' could be 'jackiechan' , the number of named tuples - i.e., 'brucelee(…)', could change as well, the next time data is pulled in. The format of the data would however remain the same. I am using @Tim Chase's solution for now. Your solution will also work but I think I'll need to create a fn to pull out the " n " values as in: ">>> n = brucelee(x=123, y=321)" Thanks, Virendra
Back to top | Article view | comp.lang.python
csiph-web