I am trying to write a program that finds prime numbers.
prime = [2]
for k in range(3,100)
if k%prime != 0
prime.append(k)
print(prime)
When I run the program I get the error:
TypeError: unsupported operand type(s) for %: 'int' and 'list'
I think that the error arises when I try to divide by the list, but I am not really sure what to do. Any help would be appreciated.