can we use slicing after function call?
latest_question_list = Question.objects.order_by('-pub_date')[:5]
above "[:5]" is used after function call and it is confusing. anyone could explain?
Posted Mar 15, 2019, 10:08 AM UTC
06
latest_question_list = Question.objects.order_by('-pub_date')[:5]
above "[:5]" is used after function call and it is confusing. anyone could explain?
Posted Mar 15, 2019, 10:08 AM UTC