There was an error while loading. Please reload this page.
2 parents 7b042ff + 4fa13ec commit 28de44aCopy full SHA for 28de44a
1 file changed
collections.rst
@@ -278,4 +278,6 @@ Like this:
278
279
Animal = namedtuple('Animal', 'name age type')
280
perry = Animal(name="perry", age=31, type="cat")
281
+ print(perry._asdict())
282
+ # Output: OrderedDict([('name', 'perry'), ('age', 31), ...
283
0 commit comments