-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbite_189.py
More file actions
43 lines (23 loc) · 808 Bytes
/
bite_189.py
File metadata and controls
43 lines (23 loc) · 808 Bytes
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
# Online Python - IDE, Editor, Compiler, Interpreter
#import operator as op
IGNORE_CHAR = 'b'
QUIT_CHAR = 'q'
MAX_NAMES = 10
#digits = "0123456789"
def filter_names(names):
t = 0
result = []
err = False
for name in names:
if name:
if name[0] == IGNORE_CHAR:
break
for c in [v for v in name]:
if c in [str(i) for i in range(1, 10)]:
break
if name[0] == QUIT_CHAR or t == MAX_NAMES:
return result
if not err:
t += 1
result.append(name)
return result