reverse list (3-12-2024) 

Run Settings
LanguagePython
Language Version
Run Command
lst=[1,2,3,4,5,6,7,8] #neg. seq: [-8,-7,-6,-5,-4,-3,-2,-1] l1=lst[1:-10:-1]# [start:end-(-1)=+1:step] print(l1) #[i:j:+value] if i,j >len(lst) i,j = len(lst) #i is missing i=0; if j is missing, j = len(lst) #if i, j<0; i,j =max(0, len(lst)+i, j) #[i:j:-ve] #if i,j>len(lst)=len(lst)-1 #if i,j<0=max(-1, len(lst)+i,j)=0
Editor Settings
Theme
Key bindings
Full width
Lines