Last active
September 30, 2015 15:34
-
-
Save juanriaza/a999ad7e65895723996c to your computer and use it in GitHub Desktop.
Ejercicio Python
This file contains hidden or 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
#!/usr/bin/env python | |
""" | |
Objetivo ....: Mostrar por pantalla el resultado de sumar | |
todos los digitos contenidos en el fichero | |
remoto apuntado por la variable URL (ubicada en | |
el modulo 'config') | |
Pistas ......: int() y list() | |
Sugerencias .: map() y filter() | |
""" | |
import urllib.request | |
URL = "https://gist.githubusercontent.com/juanriaza/cafa48e8a6b87e805cb3/raw/a937cecf644ebbf0dd3f7d021e9879b26ac088e2/trash.txt" | |
# 1. cadena pasa a ser un string con el contenido del fichero remoto | |
cadena = urllib.request.urlopen(URL).read().decode() | |
# 2. Do your magic here! | |
# 3. Mostrar el resultado | |
# print(suma) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment