43.9k views
5 votes
What is the output? there are no answer options and I'm completely lost.

>>>answer = "five times"

>>>answer[2:7] ​

User Milan M
by
4.8k points

1 Answer

4 votes

The string answer = "five times"

All strings start at index 0 and end at the length of the string minus 1

So, if we count appropriately, index 2 is v and index 7 is m

answer[2:7] goes from v to m including v but not m, therefore,

answer[2:7] = "ve ti"

User BMH
by
5.8k points