p
y
c
h
a
l
l
e
n
g
e
r
Home
Python Basics
Strings I
Exercise: Extract range from string I
Exercise: Extract range from string I
Fill in the gaps inside the square brackets to extract the word "for" from the string.
reset
text = "Code for fun!"
sub_str = text[:]
print(sub_str)
Python
Setting up Python environment...
Output