Python export addon: assign faces to vertex groups
Well I spent days with this, and suddenly I got it, thanks anyway.

This cuts a ist in parts, for example, my vertices list, without repeating items in every part. 
I had to use a while, for loops are not working exactly how I thought in python.

split = 0
r0 = []
r1 = []
r2 = []
#and so on...

a = [0,1,0,1,2,1,0,1,3,0,2,2,4,2,2,6,2,1,6,3,2]
i = 0

while i &lt; len(a):
if split == 0: 
    if a[i] not in r0:
        r0.append(a[i])
    if len(r0) == 3:
        split = 1
        i = i + 1

if split == 1: 
    if a[i] not in r1:
        r1.append(a[i])
    if len(r1) == 3:
        split = 2
        i = i + 1

if split == 2: 
    if a[i] not in r2:
        r2.append(a[i])
    if len(r2) == 3:
        split = 3
        i = i + 1

i = i + 1


#the results are: 
r0 = [0,1,2]
r1 = [1,0,3]
r2 = [0,2,4]