Nov-17-2018, 03:35 AM
part of code is going to work on a slice of a string, omitting the first character, such as handling an option. it needs to know the length of the part after the first character. which is the "better" way? this may be an issue of"pythonic" code.
getting the length of the actual slice:
getting the length of the actual slice:
z = len(x[1:])or subtracting 1 from the length of the original string:
z = len(x)-1?