Reversing a Python tuple without resorting to default values: [::-2]

后端 未结 0 2062
天命终不由人
天命终不由人 2020-11-22 01:32

Why does the Python code below reverse my_tuple

my_tuple = (1, 2, 3, 4, 5)
my_tuple[4:-6:-1]

But this code below doesn\'t. It outputs ().

相关标签:
回答
  • 消灭零回复
提交回复
热议问题