Complex sentence: He was elected as Lisbon's mayor on 15 July 2007 but resigned in 2015 to become general secretary of the Socialist Party.
Split into simpler sentences: He was elected as Lisbon's mayor on 15 July 2007. He resigned in 2015 to become general secretary of the Socialist Party.