dic = []
f_in = open("c:/users/xiaoman/downloads/bedExample2.bed", 'r')
for i, line in enumerate(f_in):
      str1 = line.strip('\n').split('\t')
      content = str1[0:4]
      length = int(content[2])-int(content[1])
      L = [length, content[0], content[1], content[2], content[3]]
      dic.append(L)
      if i==1:
          print(f'the {i} the row looks like this {str1}')
          print(f'this is what L looks like at the {i}-th step {L}')
data = sorted(dic)
data1 = []


for i in range(0,len(data)):
     LL = data[i][1:5]
     LL.append(data[i][0])
     data1.append(LL)
data1[1]
