I want to compare string representations of 3 or 4 digit integers. I want to group them into pairs of "proximity". That is, pc_dud[3] should be combined with dud[0] .
dud = ['3433', '3467', '3551', '345', '345', '3613'] pc_dud = ['3401', '3402', '3430', '0342', '3584']
Does anyone know of a good tool for this (I thought maybe something like a jellyfish)? Another solution, of course, would be to use arithmetic differences as an indicator of "proximity." Any thoughts?
source share