secret_message   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A find_message() 0 2 1
1
import re
2
3
4
def find_message(text):
5
    return ''.join(re.findall('[A-Z]', text))
6
7
8
if __name__ == '__main__':  # pragma: no cover
9
    # These "asserts" using only for self-checking and not necessary for
10
    # auto-testing
11
    assert find_message(u"How are you? Eh, ok. Low or Lower? Ohhh.") == "HELLO", "hello"
12
    assert find_message(u"hello world!") == "", "Nothing"
13
    assert find_message(u"HELLO WORLD!!!") == "HELLOWORLD", "Capitals"
14