python字符串中的None索引

example1:

x = 'runs/exp2'
dest0 = x[8:None]
dest1 = x[8:-1]
dest2 = x[8:-2]
dest3 = x[8:-3]
>>> print('--dest0:',dest0)
--dest0: 2
>>> print('--dest1:',dest1)
--dest1: 
>>> print('--dest2:',dest2)
--dest2: 
>>> print('--dest3:',dest3)
--dest3: 
>>> 

你可能感兴趣的:(python,python)