First Word (simplified) First Word (simplified)
RU PL English JA

You are given a string and you have to find its first word.

This is a simplified version of the First Word mission, which can be solved later.

  • The input string consists of only English letters and spaces.
  • There aren’t any spaces at the beginning and the end of the string.

Input: A string.

Output: A string.


first_word("Hello world") == "Hello"

How it is used: The first word is a command in a command line.

Precondition: The text can contain a-z, A-Z and spaces.