July 2018
Intermediate to advanced
474 pages
13h 37m
English
def load_document(name): file = open(name, 'r') text = file.read() file.close() return text# load sequences of cleaned textinput_filename = 'junglebook_sequences.txt'doc = load_document(input_filename)lines = doc.split('\n')
The output of the preceding code is illustrated in the following screenshot:

Read now
Unlock full access