badcrocodile
1/28/2013 - 1:28 AM

Code snippets from ASCII Bar Charts blog post

Code snippets from ASCII Bar Charts blog post

years = {2000: 2, 2001: 9, 2002: 10, 2003: 9, 2004: 14, 2005: 11, 2006: 8, 2007: 10, 2008: 14, 2009: 19, 2010: 16, 2011: 17}
for y in years:
    print y, years[y]*'|'
2000 ||
2001 |||||||||
2002 ||||||||||
2003 |||||||||
2004 ||||||||||||||
2005 |||||||||||
2006 ||||||||
2007 ||||||||||
2008 ||||||||||||||
2009 |||||||||||||||||||
2010 ||||||||||||||||
2011 |||||||||||||||||