Skip to content

Instantly share code, notes, and snippets.

@xyj404
xyj404 / test
Created February 28, 2017 06:06
from collections import namedtuple
P=namedtuple('Point',['x','y'])
pp=namedtuple('pp',['x','y'])
print P.__doc__
p=P(111,222)
print p
print p.x+p.y
print p[0]+p[1]