@yassphi You are correct. For a session of length 20, you would need to evaluate your predictions on the last 10 tracks. T would be 10. P(i) is the precision at position i of your predictions, so if at position 5, you had 2 correct predictions, P(5) = 2/5. L(i) indicates if your i'th prediction was correct, so if your prediction at position 5 was correct, L(5) = 1, and otherwise, L(5) = 0. It may be helpful to look at the local evaluation file in the starter kit: https://github.com/crowdAI/skip-prediction-challenge-starter-kit/blob/master/local_evaluation.ipynb. See also https://en.wikipedia.org/wiki/Evaluation_measures_(information_retrieval)#Average_precision.
Hope this helps!