repl.it
@howardderekl/

aBetterWayToLearnPython

Python

A Better Way to Learn Python Practice Files

fork
loading
Files
  • main.py
  • Decorators.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
from urllib.request import urlopen

with urlopen('http://sixty-north.com/c/t.txt') as story:
    story_words = []
    for line in story:
        line_words = line.decode('utf-8').split()
        for word in line_words:
            story_words.append(word)

for word in story_words:
    print(word)