Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. import json
  2.  
  3. liste=[]
  4. with open ('yelp.txt') as file:
  5. for line in file:
  6. liste.append(json.loads((line)))
  7.  
  8.  
  9. for e in range (len(liste)
  10. if 'is_open' not in liste
  11. liste.remove(liste[e])
  12. if int(liste['is_open'])==0
  13. liste.remove(liste[e])
  14. print(len(liste))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement