In my limited experience with Python/PyGame, it seems to me like list comprehensions are a good way around this "bug".
Instead of
def main(): nums = [x for x in range(10)] for num in nums: if num % 2 = 0: nums.remove(num)
It's better to either copy the list as in the following code:
def main(): nums = [x for x in range(10)] print nums for num in nums[:]: nums.remove(num) print nums main()
or iterate over its length like this:
def main(): nums = [x for x in range(10)] print nums for i in range(len(nums)): del nums[0] print nums main()
--Kamilche