Advertisement
Guest User

Untitled

a guest
Jun 18th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. FILE = 'result.txt'
  2.  
  3. with open(FILE, 'r') as fh:
  4. num_list = [line for line in fh]
  5.  
  6. path = num_list[3].split(':')[0]
  7.  
  8. pages = {}
  9. for i in num_list[4:]:
  10. ls = i.split(':')
  11. pages[ls[0]] = [ls[j].split(' ')[2].split(')')[0] for j in range(2,6)]
  12.  
  13. print(path)
  14. print(pages)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement