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))
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter