https://py.checkio.org/mission/first-word-simplified/publications/quarkov/python-3/methods-contest/?ordering=most_voted&filtering=all
题目
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.
Precondition: The text can contain a-z, A-Z and spaces.
解法
- 解法1:
def first_word_1(text):
return text