I found this syntax for printing prime numbers and l am quite confused. I would like this community to clarify
I found this syntax for printing prime numbers and l am quite confused. I would like this community to clarify Question: Nums = range(1,60) def is_prime(Nums): for x in range(2, Nums): if (Nums%x) ==0: return False return True prime_numbers = list(filter(is_prime,Nums)) Print(prime_numbers) With the for x in range(2, Nums) syntax, l expect an error to …