(Aug-01-2019, 10:30 PM)cvsae Wrote:(Aug-01-2019, 10:24 PM)law Wrote: Thanks, let me try thiscan you give me an example want do you want as result ??
I want python to count only if the fruits are similar and consecutive.
in this case the count should be 3 (it should only count the 'apple','apple','apple' in the code since they are similar and consecutive. It should ignore the other apple since there is no similar consecutive element