SHARE
TWEET

Untitled

a guest Jul 23rd, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def load_graph():
  2.     g = {}
  3.  
  4.     with open('sample.txt', 'r') as f:
  5.         for line in filter(lambda l: l != '\n', f):
  6.             row = line.split('\t')
  7.             g[int(row[1])] = list(map(int, row[2:]))
  8.  
  9.     return g
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top