Last active
October 11, 2015 17:58
-
-
Save jorgebastida/2622580 to your computer and use it in GitHub Desktop.
enjoydjango - 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 | |
| Sugerencias .: map(), filter(), int(), sum() | |
| """ | |
| import urllib2 | |
| URL = "https://gist.github.com/jorgebastida/2622704/raw/b264cf36cace951cd1ab32c1a783c0c26ff28545/trash.txt" | |
| # 1. cadena pasa a ser un string con el contenido del fichero remoto | |
| cadena = urllib2.urlopen(URL).read() | |
| # 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