1/13
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
What is the syntax for creating a multi-line string in Python?
triple quotes
What does len(text) return?
Characters
What method is used to split a string into words?
.split()
What does text.split() return?
list of strings
What data structure is represented by braces {}?
Dictionary
What do square brackets [] denote in Python?
List
What function returns the number of elements in a collection?
len()
By default, str.split() splits on ____ characters.
spaces, tabs, new lines
In the dictionary {"hello": 3}, what is the key
"hello"
In the dictionary {"hello": 3}, what is the value
3
If words = text.lower().split(), then words is a ____
List
How do you count words in a multi-line string
len(text.split())
Why use .lower() before counting words?
case-insensitivity
How do you use a dictionary for word frequencies?
for loops