Skip to content

Instantly share code, notes, and snippets.

@luisgradossalinas
Created June 25, 2022 00:14
Show Gist options
  • Save luisgradossalinas/501821555d71f427990cbc6347f50d1c to your computer and use it in GitHub Desktop.
Save luisgradossalinas/501821555d71f427990cbc6347f50d1c to your computer and use it in GitHub Desktop.
import sys
#Para realizar la prueba ejecutar python3 desafio.py Martin
cadena = sys.argv[1]
print("Mostrando el texto inicial : " + cadena)
print("Mostrando las dos primeras letras : " + cadena[0:2])
print("Mostrando las tres primeras letras : " + cadena[0:3])
print("Mostrando la dos últimas letras : " + cadena[len(cadena)-2:len(cadena)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment