回答編集履歴
1
コードの編集
test
CHANGED
@@ -10,9 +10,11 @@
|
|
10
10
|
|
11
11
|
def mail(m):
|
12
12
|
|
13
|
-
|
13
|
+
mat = re.search(r'(.+?)kara(.+?)he',m[0])
|
14
14
|
|
15
|
+
sender = mat.group(1)
|
16
|
+
|
15
|
-
receiver =
|
17
|
+
receiver = mat.group(2)
|
16
18
|
|
17
19
|
return (sender,receiver,m[1])
|
18
20
|
|
@@ -28,11 +30,17 @@
|
|
28
30
|
|
29
31
|
global people
|
30
32
|
|
31
|
-
|
33
|
+
try:
|
32
34
|
|
33
|
-
p
|
35
|
+
s,r = map(lambda p: int(p)-1,(sen,rec))
|
34
36
|
|
37
|
+
people[s]['sent'].append(mes)
|
38
|
+
|
35
|
-
people[r]['received'].append(mes)
|
39
|
+
people[r]['received'].append(mes)
|
40
|
+
|
41
|
+
except Exception as e:
|
42
|
+
|
43
|
+
print('message '+"'"+mes+"'"+' couldn\'t be sent : '+str(e)+'\n')
|
36
44
|
|
37
45
|
|
38
46
|
|