Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s = {
- "-HVC1": [
- (0,8),
- (12,18)
- ],
- "-HVC2": [(9, 17)]
- }
- seq = []
- with open("my_huge_file.txt") as file:
- for line in file:
- if line.startswith("-"):
- tx = line.split("tank", 1)[0].strip()
- else:
- for start, end in s[tx]:
- seq.append(line[start:end])
- print(seq)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement