Advertisement
Fhernd

cambiar-codificacion-archivo-abierto.py

Jul 16th, 2018
1,524
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.16 KB | None | 0 0
  1. import urllib.request
  2. import io
  3.  
  4. u = urllib.request.urlopen('http://www.python.org')
  5. f = io.TextIOWrapper(u, encoding='utf-8')
  6.  
  7. texto = f.read()
  8.  
  9. print(texto)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement