def next(term): totaal = [] i = 0 while i < len(term): c = 1 while i + 1 < len(term) and term[i] == term[i+1]: i +