Hey, I'm working on a larger project and was hoping somebody could help me with my basic error.
I am trying to make a function that takes a list, works out the largest number in that list then simply returns 1 to that number. ie in form (1,2,3,4,5) if 5 is entered. Not (1,5) which I sometimes am getting.
def listcount(list): n=max(list) for l in range(0,n): return l
Here is my current code and I am sure I am making a basic mistake, would be great if anyone could help me