-2
mersenne_list = [mersenne_number(p) for p in the list_prime]
                                                          ^

SyntaxError: invalid syntax

i entered the above code and it gave me this error, which syntax is missing, please

2 Answers2

1

You need to remove the in the to just in

mersenne_list = [mersenne_number(p) for p in list_prime]

you can read more about in here

Jacques
  • 859
  • 6
  • 18
0

Remove the:

mersenne_list = [mersenne_number(p) for p in list_prime]

Python saw two names separated by a space which is invalid syntax.

Code-Apprentice
  • 76,639
  • 19
  • 130
  • 241