Post

@PythonPr Answer: A) []
The trap: Slicing goes start to stop by step (+1 default)
› Start 3 > stop 1
› Step +1 = forward
› Can't move forward to earlier index so result is []
For beginners: Use negative step when start > stop. Result is in reverse order!
nums[3:1:-1] = [6, 5]
English

@PythonPr Answer: A → []
In slicing, if the start index is greater than the end index (and no negative step is given), Python returns an empty list.
Here nums[3:1] moves forward by default, so nothing is selected.
English

Answer: A. []
Syntax: list[start:stop]
It returns elements from index start up to but not including stop.
If start >= stop and no step is specified, the slice returns an empty list.
Here: nums[3:1]
start = 3, stop = 1
Since 3 > 1, slicing from index 3 to 1 moves forward but stop is behind start.
No negative step is specified, so default is +1, which goes forward.
Because start is after stop, slice is empty.
Summary: Forward slicing with start > stop returns an empty list.
x.com/EvyTechno/stat…
English

@PythonPr Start index = 3
End index = 1
Since 3 > 1 and no negative step is given, Python returns an empty list.
Ans---> []
English

@PythonPr Print [], start at index 3, can't end at index 1 since python can't move backwards.
English

@PythonPr A ) [] is the right answer.
Here we are using concept of list slicing. [Start:end: step_size] , here step size is not mentioned and default step size is 1 so no output will come. It will return empty string.
English

@PythonPr A. []. since slicing goes forward, nums[3:1] means “start at index 3 and go forward until index 1” → impossible.
So the output is []
English

@PythonPr The correct answer isbA. [] ✅
Python list slicing [start:stop] goes from start up to but not including stop. Here, start=3 and stop=1.
You cannot go from index 3 to index 1 moving forward, so the result is an empty list [].
English

@PythonPr Empty list
Bcz List slicing [start:stop]. Here [3:1] here 3 is included but 1 is not thats why result will empty list
English

@PythonPr []
If the starting index is greater that the "end" index, you get an empty slice
English

@PythonPr Option A – []
Because start index (3) is greater than end index (1) with a positive step, so it returns an empty list.
English















