Please ensure that JavaScript is running.
Learn
Challenges
Blogs
About
Contact
Learn
Challenges
Blogs
About
Contact
Home
/
Learn
/
Python
/
Data Types
/
Strings
/
Quiz
Strings
How do you embed expressions within a string in Python?
str.format()
f-strings
.join()
% operator
How do you specify placeholders in a string using the str.format() method?
{}
$
%
#
How do you extract the first three characters of a string called my_string using slicing?
my_string[0:3]
my_string[0:2]
my_string[1:3]
my_string[2:4]
How do you specify placeholders in a string using the % operator?
#
$
%
{}
How do you access the third character of a string called my_string?
my_string[3]
my_string[0]
my_string[1]
my_string[2]
Congratulations. You have achieved
/5.
Try Again?