learning python through algorithms