| Total Complexity | 1 |
| Total Lines | 14 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 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 |