Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- args = sys.argv
- #print(str(args))
- warning=0
- error=0
- #dates={}
- error_type=[]
- dates=[]
- dic={}
- fp = open(args[1]) # open file on read mode
- lines = fp.read().split("\n") # create a list containing all lines
- #dates.append(lines[0])
- for i in range(len(lines)):
- words=lines[i].split(" ")
- dates.append(words[0])
- error_type.append(words[7])
- #dates.append(words[0])
- print(i, lines[i])
- print("=======this is dictionary====")
- for i in range(len(dates)):
- current = dates[i]
- dic[dates[i]]=error_type[i]
- print(str(dic))
- fp.close() # close file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement