- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlevel3.py
More file actions
Latest commit
21 lines (14 loc) · 493 Bytes
/
Copy pathlevel3.py
File metadata and controls
21 lines (14 loc) · 493 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Python Challenge level 3
# Hint: One small letter, surrounded by EXACTLY three big bodyguards on each of its sides.
# Data found in source of web-page, put in level3.txt
# Problem similar to level2
importre
defmain():
#load file to string
file=open('level3.txt')
str=''.join([lineforlineinfile])
# find all occurencies and fetch a small letter
small=re.findall(r'[a-z][A-Z]{3}([a-z]{1})[A-Z]{3}[a-z]', str)
print"".join(small)
# linkedlist
main()