'Question surrounding slicing with negative step and blank start value [duplicate]
I am new to python and am having trouble understanding negative steps. Say I have mytuple = ("a", "b", "c", "d"), and I have something that says print(mytuple[:1:-1]) and the output is ("d", "c"). I understand the -1 is a negative step meaning it starts from the end but do not understand why the start (blank) and end (1) produce the output stated.
Any help in understanding the notation with this example and/or others would be greatly appreciated. Thanks
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
