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