Magdalena Andersson resigns hours after assuming the role of prime minister, after suffering a budget defeat in parliament and after her coalition partner, the Greens Party, left the two-party minority government.