I want to make a bargraph or piechart to see how many times each item in a list is represented. Some dummy data...
mylist = [a,a,b,c,c,c,c,d,d]
What I want is a bar chart that'd reflect (a = 2, b = 1, c = 4 etc...)
In reality, I have a much longer list and it is not something to do manually. I started to make a "for loop" that'd compare each item with the previous, and create a new list if different than the last, but even that seems cumbersome. There has to be a simple and elegant way to do this. I am sorry if this has already been addressed, when searching I either get results too simple or overly complicated. This got tagged as a duplicate for how to count elements in a list, this is different because it also addresses the graphing.