We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cf8f893 commit 97bab6eCopy full SHA for 97bab6e
1 file changed
hideen messgae
@@ -16,3 +16,20 @@ if __name__ == '__main__':
16
assert find_message("How are you? Eh, ok. Low or Lower? Ohhh.") == "HELLO", "hello"
17
assert find_message("hello world!") == "", "Nothing"
18
assert find_message("HELLO WORLD!!!") == "HELLOWORLD", "Capitals"
19
+
20
+import string
21
+def find_message(text):
22
+ """Find a secret message"""
23
+ #tests
24
+ if not 0 < len(text) <=1000:
25
+ return ""
26
+ if not all(ch in string.printable for ch in text):
27
28
+ #discover
29
+ result = ''
30
+ for c in text:
31
+ if c.isupper():
32
+ result += c
33
+ return result
34
35
0 commit comments