I am having a bit of troubles getting this part of my code to work, I need to find a way to count the amount of times than an H occurs in a row in a list, (H, H, H) would count as two occurrences. I feel like I'm getting somewhere but just can't get the j to count up.
list['H', 'H', 'T', 'H']
j = 0
n = 0
for letter in list:
if list[n] == ['H'] and list[n+1] == ['H']:
j = j + 1
print('it was this amount of times ' + str(j))