python: adding idiom for reading file in one line