計算機科学のブログ

ほしい物リスト

Python - List of Files: Functions, Modules and Files - tuple

Head First Python: A Learner’s Guide to the Fundamentals of Python Programming, A Brain-Friendly GuidePaul Barry(著)、 O’Reilly Mediaの Chapter 4.(List of Files: Functions, Modules and Files)、EXERCISE(41/108)の解答を求めてみる。

Jupyter(コード、入出力結果)

Files.ipynb

import swimclub
data = swimclub.read_swim_data('Darius-13-100m-Fly.txt')
times = data[4]
times
['1:27.95', '1:21.07', '1:30.96', '1:23.22', '1:27.95', '1:28.30']
swimmer, age, distance, stroke, times2, average = data
times2
['1:27.95', '1:21.07', '1:30.96', '1:23.22', '1:27.95', '1:28.30']