arraylist - What is the best way make an array out of my data in python? -


I am new to Python and I need help in creating / displaying array from this data type.

  link1 | 2-3,6 - 9, 12-13. 4-5,10-11,14-16  

format is link_name | Boundary1 | Limit 2 to put value a to border 1 and b to border 2

  Status: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Value: AABBAAAABBAABBB  

This is what came with me:

  data = data.split (' '' [1] data = data. Split (',') data = [d.split ('-')] for data = data ([int (d [0]), int (d [1]) ) Data in terms of d) Positions = range (2, 17) value = ['A' if any (data [ja] [1]> = i & gt; = data [j] [0] in the range of j (Lane)) and In terms of 'B']  

Actually, the first list of any information but categories is not needed, because whatever is not 'A' by default 'B' 'I keep my code in this format using the first four lines of my code:

  [(2,3), (6), (12,13)] < / Code> 

and then a list is considered for classifying the data.


Comments