daily pastebin goal
16%
SHARE
TWEET

Untitled

a guest Jan 11th, 2017 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. fi = open('a1.txt', 'r')
  4. fo = open('a1ans.txt', 'w')
  5.  
  6. for s in fi:
  7.     a = eval(s)
  8.     s = s.replace('(', '')
  9.     s = s.replace(')', '')
  10.     b = eval(s)
  11.  
  12.     if a == b:
  13.         fo.write('1\n')
  14.     else:
  15.         fo.write('0\n')
RAW Paste Data
Top