Q: Creating a 'histogram' from a occurrence list Python noob here in need of some help.
I have a set of data that is in the format [['item', count], ........] and a need to create a histogram of sort that prints an asterisk for every ten occurrences counted. 
Example:
list=[['a', 22], ['b', 11], ['c', 45]]

Histogram:
a **
b *
c ****

Any ideas would be very helpful.

A: data = [['a', 22], ['b', 11], ['c', 45]]
for item in data:
    print(item[0] + ': ' + ('*' * (item[1] // 10)))

You can print a string multiple times with the * operator. So '*' * 5 produces *****. I would use a dictionary instead of a list though:
data = {'a': 22, 'b':11, 'c':45}
for item in data:
    print(item + ': ' + ('*' * (data[item] // 10)))

just because a dictionary suits your purpose better.
