As I am new to python programming, I am having difficulty writing a python program. I am trying to count a set of seven objects(?) of three numbered digits and tabs within a long list. Then I need to find which set of numbers (in multiples of three's) have the maximum number along the list. The numbers are separated by a tab and the set of numbers are in seven's. For example:
['128','130','140','145','','','','283','379','','','','','','175','183','187','','','',''etc.]
The first set of numbers and tabs in the list are 128, 130, 140, 145, tab, tab, tab. The second set of numbers and tabs in the list are 283, 379, tab, tab, tab, tab, tab. Finally, the third set of numbers in the list are 175, 183, 187, tab, tab, tab, tab.
I would like to count the three number digits in the seven sets of numbers and tabs, and then have a maximum output number of which set shows the most three digit numbers. For example:
['128','130','140','145','','','','283','379','','','','','','175','183','187','','','','']
this first set = 4 this second set = 2 this third set = 3
In this example the final output number should be 4, because the first set of seven object revealed the most 3 digit numbers. Here is my what I currently have.
#!/usr/bin/env python
allele = '128 130 140 145 283 379 175 183 187
elementlist=allele.split('\t')
string= str(elementlist)
type = string.replace('\t','0')
print type
I would appreciate any thoughts or concerns.