how to create simple pattrens classiyfier in python

PHOTO EMBED

Fri Oct 25 2024 19:39:51 GMT+0000 (Coordinated Universal Time)

Saved by @freepythoncode ##python #coding #python #algorithm


pattrens = [
    '123456',
    '6665522',
    '887799',
    '123456',
    '6665522',
    '1111222',
    '123456',
    '6665522',
    '887799',
    '123456',
    '111111'
]


def classify_pattrens(pattrens_list):
    labels = {k : [] for k in pattrens_list}
    for pattren in pattrens_list:
        labels[pattren].append(pattren)

    return labels

print(classify_pattrens(pattrens))
content_copyCOPY