Advertisement
TwentyEight

2019#Q

Feb 20th, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. import numpy as np
  2. import random
  3.  
  4. filename = 'a_example.txt'
  5. f = open(filename, 'r')
  6. N = int(f.readline())
  7. isVert = np.full(N, False)
  8. tags = np.full(N, set())
  9. for n in range(N):
  10.     s = f.readline().split()
  11.     if s[0] == 'V':
  12.         isVert[n] = True
  13.     tags[n] = set(s[2:])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement