[Solved] Python3 what for i in range(nums.count(val)): does [closed]
nums.count(val) counts how many instances of val are in nums. for i in range(nums.count(val)):… is a loop that iterates nums.count(val) times, or, in other words, it iterates as many times as the number of val‘s in nums. i does not actually do anything here, so the more “Pythonic” way of writing that would be to … Read more