I have a list like below.
['T46', 'T43', 'R45', 'R44', 'B46', 'B43', 'L45', 'L44', 'C46', 'C45']
where I want to group according to int value:
[id][' ',' ',' ',' ',' '] # AREA PATTERN [Top, Right, Bottom, Left, Center][46]['1','0','1','0','1'] #Top,Bottom,Center[45]['0','1','0','1','1'] #Right,Left,Center[43]['1','0','1','0','0'] #Top,Bottom[44]['0','1','0','1','0'] #Right,Left
Is this possible? What I tried so far is:
id_area = []for a in area:id = a[1:3]areas = a[:1]if any(str(id) in s for s in area):id_area = #lost