2021-02-06 04:42:36 +00:00
|
|
|
---
|
|
|
|
id: 5e7b9f0d0b6c005b0e76f075
|
2022-03-11 22:52:40 +05:30
|
|
|
title: 'Redes: Usando urllib en Python'
|
2021-02-06 04:42:36 +00:00
|
|
|
challengeType: 11
|
|
|
|
videoId: 7lFM1T_CxBs
|
2022-03-11 22:52:40 +05:30
|
|
|
bilibiliIds:
|
|
|
|
aid: 546908270
|
|
|
|
bvid: BV1Xq4y1H7e6
|
|
|
|
cid: 377331524
|
2021-02-06 04:42:36 +00:00
|
|
|
dashedName: networking-using-urllib-in-python
|
|
|
|
---
|
|
|
|
|
|
|
|
# --question--
|
|
|
|
|
|
|
|
## --text--
|
|
|
|
|
2022-03-11 22:52:40 +05:30
|
|
|
¿Cómo será la salida del siguiente código?:
|
2021-02-06 04:42:36 +00:00
|
|
|
|
|
|
|
```python
|
|
|
|
import urllib.request
|
|
|
|
fhand = urllib.request.urlopen('http://data.pr4e.org/romeo.txt')
|
|
|
|
for line in fhand:
|
|
|
|
print(line.decode().strip())
|
|
|
|
```
|
|
|
|
|
|
|
|
## --answers--
|
|
|
|
|
2022-03-11 22:52:40 +05:30
|
|
|
Sólo el contenido de "romeo.txt".
|
2021-02-06 04:42:36 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
2022-03-11 22:52:40 +05:30
|
|
|
Un encabezado y el contenido de "romeo.txt".
|
2021-02-06 04:42:36 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
2022-03-11 22:52:40 +05:30
|
|
|
Un encabezado, un pie de página y el contenido de "romeo.txt".
|
2021-02-06 04:42:36 +00:00
|
|
|
|
|
|
|
## --video-solution--
|
|
|
|
|
|
|
|
1
|
|
|
|
|