0

i am using eclipse with python. i want to import a list from another module in directory (Jan23) file (3.py) list(color)

from Jan23.3 import color

gives me

SyntaxError: invalid syntax

why?

2milli
  • 50
  • 8
  • 1
    Short answer: Module names can't start with a digit; use [a legal identifier as the module name](https://docs.python.org/3/reference/lexical_analysis.html#identifiers) if you want to be able to use it normally: "Within the ASCII range (U+0001..U+007F), the valid characters for identifiers are the same as in Python 2.x: the uppercase and lowercase letters A through Z, the underscore _ and, *except for the first character*, the digits 0 through 9." (emphasis added) – ShadowRanger Jan 23 '18 at 14:11
  • thanks for the help. I will definitely read first and ask questions later from now on :) – 2milli Jan 23 '18 at 14:16

0 Answers0