-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
  • 927
  • 9
  • 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
  • 81,660
  • 23
  • 145
  • 268