Python looks excruciatingly slow to me. If you want fast I believe you need to think and write in vector languages like kdb+/q. I am not a kdb+ expert by any means and my code can probably use more q primitives, but here was my solution in ~2 minutes:
i1:("I I";" ")0: `:1.txt;
sum {abs last deltas x }each flip asc each i1 / answer 1
sum {x * sum x = i1[1]}each i1[0] / answer 2