Suppose I have random list in which some numbers are same.. like in above 3 is repeating.. I want to create partition like above on right side. but I made it manually.. I want each consecutive-similar numbers should be in length and non consecutive & non- similar the others should be appear as 1.
to make desired combination or pattern of data



