I want to create a list out of my string in python that would show me how many times a letter is shown in a row inside the string.
for example:
my_string= "google"
i want to create a list that looks like this:
[['g', 1], ['o', 2], ['g', 1], ['l', 1], ['e', 1]]
Thanks!
You could use groupby from itertools: