In this lesson, students learn how to access characters in a string using indexing.
Students will be able to:
In this lesson, students learn how to access multiple characters in a string using slicing.
Students will be able to:
#:#
, #:
, :#
, :
)In this lesson, students learn how to split strings into a list of characters or a list of groups of characters using list
and split
. They will also learn how to combine list items into a string using join
.
Students will be able to:
list
to separate a string into a list of characterssplit
to separate a string into a list of words or groups of characters depending on the element provided for the split characterjoin
In this lesson, students learn how to use four new methods, strip
, replace
, find
, and count
, to alter strings.
Students will be able to:
strip
method to remove leading and trailing whitespace from a stringreplace
method to use a different character throughout a stringfind
method to return the index value of the first location of a certain element in a stringcount
method to return the number of times an element occurs in a stringIn this lesson, students learn how to loop over characters in a string and ways to update strings as they are looped over.
Students will be able to:
in
keyword to access characters in a stringrange
keyword to access characters in a stringIn this project, students work with a partner to analyze a blog post about game 5 of the Stanley Cup Final in 2023. They will follow scaffolded steps and will learn about web scraping which they will be simulating in this project.
Students will be able to:
In this lesson, students review content with a 10 question End-of-Unit Quiz.
Students will be able to:
string_var[index]
)string_var[index:index]
, string_var[index:]
, string_var[:index]
, string_var[:]
)list(string_var)
)string_var.split()
or string_var.split(element)
)element.join(list_var)
)strip
replace
find
count