Two Pointer Algorithm Python Code For Snake