Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Use the file name mbox-short.txt as the file name
- fname = input("Enter file name: ")
- fh = open(fname)
- p = 0
- for line in fh:
- if line.startswith("X-DSPAM-Confidence:") :
- p = 1 + p
- z = line[20:28]
- y = z + z
- mean = y / p
- print(mean)
- print("Done")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement