-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSameFromTo.py
More file actions
46 lines (39 loc) · 1.13 KB
/
SameFromTo.py
File metadata and controls
46 lines (39 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import os.path
j = 0
for copies in range(200, 0, -1):
if os.path.isfile('from_to_check (' + str(copies) + ').csv'):
check = 0
file = open('from_to_check (' + str(copies) + ').csv')
a = file.readlines()
b = []
for i in range(1, len(a)):
a[i] = a[i].replace('\n', '')
b.append(a[i])
for i in b:
c = i.split(',')
c[1] = int(c[1])
if c[1] > 999:
print("Sender " + c[0] + " sent " + str(c[1]) + " emails.")
check = 1
if check == 0:
print('No match')
file.close()
j = 1
break
if j == 0:
check = 0
file = open('from_to_check.csv', 'r')
a = file.readlines()
b = []
for i in range(1, len(a)):
a[i] = a[i].replace('\n', '')
b.append(a[i])
for i in b:
c = i.split(',')
c[1] = int(c[1])
if c[1] > 999:
print("Sender " + c[0] + " sent " + str(c[1]) + " emails.")
check = 1
if check == 0:
print('No match')
file.close()