Practice - The String Type in Python
Practice Questions
Test your understanding with targeted questions
What is the output of 'Python' + 'Programming'?
💡 Hint: Think about how strings are combined.
What does s[1] return for s = 'Programming'?
💡 Hint: Recall that indexing starts at 0.
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What is a string in Python?
💡 Hint: Think about the definition of a string.
True or False: In Python, the first character of a string has an index of 1.
💡 Hint: Recall how indexing works.
1 more question available
Challenge Problems
Push your limits with advanced challenges
You have a string variable msg = 'Happy coding!'. Write Python code to extract 'coding' from this string using indexing.
💡 Hint: Think about how slicing works in Python strings.
You need to create a greeting message stored in a variable called greeting that combines your name with 'Welcome to Python, 'You should end up with 'Welcome to Python, [your name]'.
💡 Hint: Use concatenation to achieve this.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.