(my "first" python program) Transpose space-separated matrix file, which may not fit in memory