Created
June 25, 2022 00:14
-
-
Save luisgradossalinas/501821555d71f427990cbc6347f50d1c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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