Practice Strings in Python - 7 | Strings in Python | Python Programming Language
Students

Academic Programs

AI-powered learning for grades 8-12, aligned with major curricula

Professional

Professional Courses

Industry-relevant training in Business, Technology, and Design

Games

Interactive Games

Fun games to boost memory, math, typing, and English skills

Strings in Python

7 - Strings in Python

Enroll to start learning

You’ve not yet enrolled in this course. Please enroll for free to listen to audio lessons, classroom podcasts and take practice test.

Learning

Practice Questions

Test your understanding with targeted questions

Question 1 Easy

Create a string and print the first character.

💡 Hint: Use indexing.

Question 2 Easy

Write a string and show its length.

💡 Hint: What method measures length?

4 more questions available

Interactive Quizzes

Quick quizzes to reinforce your learning

Question 1

What does the expression 'Python'[-1] return?

P
n
None

💡 Hint: What letter is at the end of 'Python'?

Question 2

True or False: The statement 'Hello' + ' World' results in 'HelloWorld'.

True
False

💡 Hint: Consider what happens when two strings are joined without spaces.

2 more questions available

Challenge Problems

Push your limits with advanced challenges

Challenge 1 Hard

Write a function that takes a string as input and returns the string with words reversed but not the characters in the words.

💡 Hint: Consider how to manipulate lists after splitting.

Challenge 2 Hard

Create a program that accepts a user input of a sentence and formats it into a string showing only the first letter of each word capitalized.

💡 Hint: How can you use split and join effectively for this task?

Get performance evaluation

Reference links

Supplementary resources to enhance your learning experience.