PythonSkills.org
Courses
Exercices
Challenges
Quizzes
Open console
0 points
Get started
Loading...
All Challenges
Loading...
Not Solved
Extract first five characters
Write a function that takes a string and returns the first five characters. If the string has fewer than five characters, return the entire string.
Beginner
Hint
sample input: "hello world"
sample output: hello
Run Tests
Clear Tests
Test Output:
Show Solution
Show Code
Loading...
Next challenge: Skip every other character