Light Mode
Dark Mode
How is this counted as wrong? Program works??
def first_word(text: str) -> str:
    words = list(text.partition(' '))
    print(words[0])

assert first_word('Lorem Ipsum dolor sit amet') == 'Lorem'

The program works fine, but any assertion attempts still count it as wrong even though it does as it's supposed to. Di I do anything wrong or is this an issue with the puzzle?

Created: May 29, 2023, 7:20 p.m.
Updated: May 29, 2023, 8:01 p.m.
0
4
User avatar
MKFREY