Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def load_graph():
- g = {}
- with open('sample.txt', 'r') as f:
- for line in filter(lambda l: l != '\n', f):
- row = line.split('\t')
- g[int(row[1])] = list(map(int, row[2:]))
- return g
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement