Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Secret Message by Nick__Aleksashin
def find_message(text):
ans = ""
for ch in text:
if t == ch.upper() and ch.isupper():
ans += ch
return ans
find_message = lambda text: "".join([ch for ch in text if ch == ch.upper() and ch.isupper()])
def test_function():
assert find_message(u"How are you? Eh, ok. Low or Lower? Ohhh.") == "HELLO", "hello"
assert find_message(u"hello world!") == "", "Nothing"
assert find_message(u"HELLO WORLD!!!") == "HELLOWORLD", "Capitals"
if __name__ == '__main__':
test_function()
Dec. 5, 2016
Comments: