I want to print upto 50 elements in a list
i.e If there are 100 elements in the list I need first 50 alone. My current code for the above is
'Filter':switcheroo.get(zaxis,["None Selected"])[zaxis].unique().tolist()[:50]
If there are 25 elements in the list I need 25 alone. I get an error when the above code is used. from other posts I understand that the below code is the solution, but I cant understand how to implement it with my current code.'
[x for _, x in zip(range(n), records)]
How to take the first N items from a generator or list in Python?