計算機科学のブログ

ほしい物リスト

Python - Lists of Numbers: Processing List Data - string, methods, strip, split

Head First Python: A Learner’s Guide to the Fundamentals of Python Programming, A Brain-Friendly GuidePaul Barry(著)、 O’Reilly Mediaの Chapter 3.(Lists of Numbers: Processing List Data)、SHARPEN YOUR PENCIL(167/682)の解答を求めてみる。

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

Darius.ipynb

times = lines[0].strip().split(',')
times
['1:27.95', '1:21.07', '1:30.96', '1:23.22', '1:27.95', '1:28.30']