Post

@PythonPr Answer:C). tho.
This is due to Python's string slicing:
Strings use 0-based indexing.
The slice [2:5] extracts characters starting from index 2 (inclusive) up to, but not including, index 5 (exclusive).
In the string "python":
p is at index 0
y is at index 1
t is at index 2
English

@PythonPr Answer: B
Solution: This is an application of slicing in python.
As you know, [] is used for indexing, ie, picking out one item from a list or string.
But there is more to it. [] can also be used for slicing, ie, to extract multiple items.
Let's see how it works
+
English

@PythonPr B) tho
This is the Python slicing method will stat from index 0, and include everything except the final index number.
English

@PythonPr The output of the above Python code is B. tho because the index was sliced
English































