Two Pointer Algorithm Python Template Injection