Python Create Polygon From Lines