I am doing one of the Python beginner projects in this subreddit: http://www.reddit.com/r/beginnerprojects and for part of one of the tasks, I need to remove all integers from this list that have less than two digits. I'm not sure where I'm going wrong. I know I could just change the range in the list, but I want to utilise as many skills as possible.
numbers = [x for x in range(1,1001)]
def two_or_more_digits():
for num in numbers:
if len(str(num)) < 2:
numbers.remove(num)
print (numbers)
I am working in Python 3.
Thank you.