Which string method counts the number of characters in a string?
AThe count() function
BThe index() function
CThe replace() function
DThe len() function
Which of the following lines of code would slice all of the characters before index 6 and then stride through every other character in the slice?
Astring_var[:6:2]
Bstring_var[6::1]
Cstring_var[6::2]
Dstring_var[:6:1]
What would you expect to happen in response to the code string_var[3:5]?
AA substring will be sliced from index 3 through index 4.
BA substring will be sliced from index 0 through 5.
CThe substring will be sliced from index 3 through the end of the string, and then it will stride through the string.
DA slice will be created using the characters before index 3 and then it will stride with the stride number 5.
Which list method returns an element at a specific index and then deletes that element from the list?
AThe pop() function
BThe remove() function
CThe append() function
DThe replace() function
AThe count() function
BThe index() function
CThe replace() function
DThe len() function
Astring_var[:6:2]
Bstring_var[6::1]
Cstring_var[6::2]
Dstring_var[:6:1]
AA substring will be sliced from index 3 through index 4.
BA substring will be sliced from index 0 through 5.
CThe substring will be sliced from index 3 through the end of the string, and then it will stride through the string.
DA slice will be created using the characters before index 3 and then it will stride with the stride number 5.
AThe pop() function
BThe remove() function
CThe append() function
DThe replace() function