Skip to content

Commit cf8f893

Browse files
authored
Create hideen messgae
1 parent 3bcc821 commit cf8f893

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

hideen messgae

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
def find_message(text):
2+
"""Find a secret message"""
3+
lista = []
4+
for each in text:
5+
if each[0].isupper():
6+
lista.append(each[0])
7+
wynik = ''.join(lista)
8+
9+
if not list:
10+
return ""
11+
else:
12+
return wynik
13+
14+
if __name__ == '__main__':
15+
#These "asserts" using only for self-checking and not necessary for auto-testing
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"

0 commit comments

Comments
 (0)