From this answer I learned how can I count occurrences of any character in a string using a map,
Here is my code which counts occurance of any vowels in a string,
name = "maverick dean"
vowels = 'aeiou'
x = list(map(name.lower().count, 'aeiou'))
As you can see I used list to put each value of a map in a list.
Which gives this output,
[2, 2, 1, 0, 0]
My desire output is
[ "a:2", "e:2", "i:1", "o:0", "u:0" ]
Now I understand I can use for loop to do it, but is there any other way to map output of x directly so that it shows alongside the actual vowel?