borsha06

task_2.py

May 30th, 2021 (edited)
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. file = open("new_left.txt", "r")
  2. # file2 = open("new_left_result", "a")
  3.  
  4. for line in file:
  5.     fields = line.split(" ")
  6.     print(str(fields[1]))
  7.     if ("[2009-05-04" in str(fields[1]) or "[2009-05-05" in str(fields[1]) or "[2009-05-06" in str(fields[1]) or \
  8.             "[2009-05-07" in str(fields[1]) or "[2009-05-08" in str(fields[1])) and ("T20:00+14:30" in str(fields[1])
  9.             or "T20:00+15:00" in str(fields[1]) or "T20:00+15:30" in str(fields[1])):
  10.             print(fields[0])
  11.  
  12. file.close()
Add Comment
Please, Sign In to add comment