During a fundraiser at a private home in Piedmont, Calif., the president spoke of his visit Sunday to Aurora, Colo., where 12 people were killed and 58 were wounded at a midnight screening of the new Batman movie early Friday.
"Sometimes when bad things happen, horrible things happen, I think it's easy for us to slip into despair," he said. "And yet if you had spent some time like I did with those people who had faced own just unimaginable pain with strength and grace, it would make you extraordinarily optimistic about America."
Obama said it sometimes seems as if "the country is constantly arguing, everybody is down and out."
"But when you travel the country and meet people, Americans are strong and they are resilient and they are optimistic and they are confident about their futures and their kids' futures," he said. "They recognize that there's dysfunction in Washington and they'd like to see change, and they recognize that the economy is not working for everybody the way it should, and they'd like to see that change.
"But they understand as well as anybody that we are incredibly blessed with a country that is the closest thing to a form of government that allows all of us to achieve and live out our dreams," the president said. "And they are thankful for it every day and all they want to see is that their leadership reflect the same decency and common sense that they try to apply every single day in their lives."
Obama said the presidential election will be a close race because the U.S. economy is still recovering from the worst downturn since the Great Depression.
"The challenges we've seen in Europe are blowing back onto our shores," he said. "And most people analyze the economy not through some macroeconomic analysis, they evaluate in terms of, do I have a job, do my kids have a job, how's my home value doing. And in that environment people are still having a tough time."
2014: The Year in Music [PHOTOS]