How to get first 3 elements with values per ordered row in Python

join shbcf.ru