WikiPedia has a handy ranking of all US presidents which may not precisely match your own view but does reflect a certain consensus.
The best five presidents, according to this ranking, were:
1) Abraham Lincoln: 8 years as state legislator in Illinois, 2 years in US House of Representatives, unsuccessful candidate for US Senate
2) Franklin Roosevelt: 2 years in NY state senate, 7 years as Asst Secretary of the navy, unsuccessful candidate for VP of the US in 1920, 4 years as governor of New York
3) George Washington: member of the Virginia House of Burgesses, not sure how long for, which seems to have been his only previous experience of elected office; general during Revolutionary War
4) Thomas Jefferson: Also member of House of Burgesses, not sure how long for, and of its successor the Virginia House of Delegates for 3 years; governor of Virginia for 3 years; Secretary of State for 4 years; Vice-President for 4 years.
5) Theodore Roosevelt: 3 years in New York state legislature, 1 year as Assistant Secretary of the Navy, 2 years as governor of New York, six months as Vice-President of the United States.
By contrast, the worst five according to this ranking were:
1) Warren Harding: 4 years in state senate, 2 years as governor of Ohio, six as US Senator.
2) James Buchanan: 4 years in state legislature, 10 in US House of Representatives, 11 in US Senate, 4 as Secretary of State
3) Franklin Pierce: 4 years in US House of Representatives, 5 in US Senate, successful military figure
4) Andrew Johnson: Tennessee state legislature, not sure how long; 5 years as governor of Tennessee and three as military governor; almost six weeks as Vice President of the United States
5) William Henry Harrison: successful military figure, 3 years in US House of Representatives, 3 years in state senate, 4 years in US Senate, unsuccessful candidate for President of the United States in 1836
It is striking how similar the careers of the best (Lincoln) and the worst (Harding) are. Indeed, if you had to choose betwen the two of them based purely on political experience, you would probably choose Harding, who had six years on Capitol Hill compared to Lincoln's two, and had been a state governor to boot. The most extensive political CV of these ten, perhaps of any president (I haven't gone into the others in depth) is Buchanan's, with a decade in each house on Capitol Hill and a term as Secretary of State, which still leaves him ranked as worse than any other President bar Harding.
This shouldn't really be surprising. Once you've reached a certain level of political activity, the length of your CV reflects your age much more than your ability. (Indeed, that is probably true in any walk of life.) In addition, of course, it's not just what you have done but how you have done it: Lincoln's unsuccessful campaign for the Senate in 1858 was a far more impressive affair than anything Harding ever did in his life. And finally, for me, and I suspect for many people, most of the important lessons I have learned came relatively early in my career and increasingly long ago. But you won't see that on my CV.