I would like to know in the following code:
import sys
if len(sys.argv) == 2:
numero = sys.argv[1][::-1]
longitud = len(numero)
for i in range(longitud):
print('{:0{}d}'.format(int(numero[i]) * 10 ** i, longitud))
else:
print('Error, número de argumentos no válido')
print('Ejemplo: python descomposicion.py [numero]')
What is the function of this:
[:: - 1]
and in what situations it is used, thank you!