Title: Presidency of Barack Obama
Content:  Barack Obama's tenure as the 44th president of the United States began with his first inauguration on January 20, 2009, and ended on January 20, 2017. Obama, a Democrat from Illinois, took office following a decisive victory over Republican nominee John McCain in the 2008 presidential election. Four years later, in the 2012 presidential election, he defeated Republican nominee Mitt Romney to win re-election. Obama was succeeded by Republican Donald Trump, who won the 2016 presidential election. He was the first African American president, the first multiracial president, the first non-white president, and the first president to have been born in Hawaii. Obama's first-term actions addressed the global financial crisis and included a major stimulus package, a partial extension 
Title: Barack Obama
Content:  reside in Washington, D.C. During Obama's terms as president, the United States' reputation abroad, as well as the American economy, significantly improved. Obama's presidency has generally been regarded favorably, and evaluations of his presidency among historians, political scientists, and the general public frequently place him among the upper tier of American presidents. Since leaving office, Obama has remained active in Democratic politics, including campaigning for candidates in the 2018 midterm elections, appearing at the 2020 Democratic National Convention and campaigning for Biden during the 2020 presidential election. Outside of politics, Obama has published three bestselling books: Dreams from My Father (1995), The Audacity of Hope (2006) and A Promised Land (2020).
Title: Barack Obama's farewell address
Content:  Obama served as the first African American President of the United States for two terms, first elected in 2008 and reelected in 2012. During his presidency, his administration addressed the 2007-2008 global financial crisis (including a major stimulus package), oversaw the passage and implementation of the Patient Protection and Affordable Care Act, partially extended Bush tax cuts, took executive action on immigration reform, and took steps to combat climate change and carbon emissions. Obama also authorized the raid that killed Osama bin Laden, signed the New START treaty with Russia, signed the Paris Agreement, and negotiated rapprochements with Iran and Cuba. Democrats controlled both 
Title: Presidency of Barack Obama
Content:  orchestrated the military operation that resulted in the death of Osama bin Laden on May 2, 2011. In his second term, Obama took steps to combat climate change, signing a major international climate agreement and an executive order to limit carbon emissions. Obama also presided over the implementation of the Affordable Care Act and other legislation passed in his first term, and he negotiated rapprochements with Iran and Cuba. The number of American soldiers in Afghanistan fell dramatically during Obama's second term, though U.S. soldiers remained in Afghanistan throughout Obama's presidency. Republicans took control of the Senate after the 2014 elections, and Obama continued to grapple with congressional Republicans over government spending, immigration, judicial nominations, and other issues.
Title: Political positions of Barack Obama
Content:  President Obama was first inaugurated in January 2009, in the depths of the Great Recession and a severe financial crisis that began in 2007. His presidency continued the banking bailout and auto industry rescue begun by the George W. Bush administration and immediately enacted an $800 billion stimulus program, the American Recovery and Reinvestment Act of 2009 (ARRA), which included a blend of additional spending and tax cuts. By early 2011, the economy began creating jobs consistently each month, a trend which continued through the end of his tenure. Obama followed with the 2010 Patient Protection and Affordable Care Act. By 2016, the law covered approximately 23 million 
Title: Presidency of Barack Obama
Content:  Obama's place of birth during Obama's first term. Republicans also retained control of the House and Senate. During the eight years of Obama's presidency, the Democratic Party experienced a net loss of 1,041 governorships and state and federal legislative seats. Ronald Brownstein of The Atlantic noted that these losses were similar to those of other post-World War II two-term presidents. Trump and Obama frequently communicated during the transition period, and Trump stated that he sought Obama's advice regarding presidential appointments. However, President-elect Trump also criticized some of Obama's actions, including Obama's refusal to veto a UN Resolution condemning Israel settlements. In his farewell address, Obama expressed concerns about a divisive political environment, economic inequality, and racism, but remained optimistic about the future.
Title: Barack Obama
Content:  governor of Massachusetts, and Representative Paul Ryan of Wisconsin. On November 6, 2012, Obama won 332 electoral votes, exceeding the 270 required for him to be reelected as president. With 51.1 percent of the popular vote, Obama became the first Democratic president since Franklin D. Roosevelt to win the majority of the popular vote twice. Obama addressed supporters and volunteers at Chicago's McCormick Place after his reelection and said: "Tonight you voted for action, not politics as usual. You elected us to focus on your jobs, not ours. And in the coming weeks and months, I am looking forward to reaching out and working with leaders of both parties."
Title: Barack Obama 2012 presidential campaign
Content:  On January 20, 2009, Barack Obama was inaugurated as the 44th President of the United States. On April 4, 2011, President Obama officially announced his candidacy for re-election. The announcement was made via an online video titled "It Begins With Us", posted on his campaign website. The President also filled out official forms with the FEC at that time. President Obama did not face a significant challenge in the Democratic primaries, with no other candidate on the ballot in all but seven states. On April 3, 2012, Obama won the Maryland and District of Columbia primaries, giving him more than the required 2,778 delegates to secure the nomination. On April 30, 2012 the campaign announced that its slogan would be "Forward". The campaign was based in Chicago in One Prudential Plaza, instead of in Washington, D.C., where all other modern incumbent presidents have had their re-election headquarters. The decision to base the campaign outside of Washington was said have been taken so as to ensure grassroots support for re-election.
Title: Timeline of the Barack Obama presidency (2016–January 2017)
Content:  Manning, who was convicted of giving classified information to WikiLeaks. ; January 18 – President Obama holds the final press conference of his presidency, at the White House's James S. Brady Press Briefing Room. ; January 19 – President Obama commutes the sentences of 330 nonviolent drug offenders, the most acts of clemency ever granted in a single day by any U.S. president. ; January 20 – President Obama completes his two terms in office and leaves the White House for the final time as Commander-in-chief. ; January 20 – Donald Trump is inaugurated as the 45th president of the United States, at noon EST. Barack Obama begins his post-presidency with a vacation in Palm Springs, California. 
Title: Barack Obama
Content:  inaugurated alongside his running mate Joe Biden, on January 20, 2009. Nine months later, he was named the 2009 Nobel Peace Prize laureate, a decision that drew a mixture of praise and criticism. Obama signed many landmark bills into law during his first two years in office. The main reforms include: the Affordable Care Act (ACA or "Obamacare"), although without a public health insurance option; the Dodd–Frank Wall Street Reform and Consumer Protection Act; and the Don't Ask, Don't Tell Repeal Act of 2010. The American Recovery and Reinvestment Act and Tax Relief, Unemployment Insurance Reauthorization, and Job Creation Act served as economic stimuli amidst the Great Recession. After a lengthy debate 

Question: what did obama do before he was elected president?
Answer: Illinois State Senator.