//数组从0开始,2到5,不包括5,cde


name = "abcdefgABCD"

print(name[2:5])



#cdefgAB,后面从0到开始,0,-1,-2

print(name[2:-2])


#cegB,后面步长为2

print(name[2:-2:2])



#DCBAgfedcb,从-1开始,到b,不包括0

print(name[-1:0:-1])