Hi Guys, Can anyone help me redo this, so it'll be a list comprehension instead?
def parseAnnotation(annotation):
ExonStartAndStop = []
d = annotation.split(',')
for i in d:
removeparenteses = i[1:-1]
numbers = removeparenteses.split('..')
ExonStartAndStop.append((int(numbers[0]),int(numbers[1])))
return ExonStartAndStop
example usage:
print parseAnnotation('(1834..2736)') ---> [(1834, 2736))