Hello @wolfram420,
this is more a generic python question rather than a ROOT related one, it’s a bit out of scope of this forum ![]()
However, the invalid syntax error may be raised in many situations, I list a few
- Missing quotes. For example,
print(Hello)instead ofprint("Hello"). - Misspelled reserved keywords. For example, writing
iffinstead ofif. - Incorrect Indentation. For example, missing required spaces or tabs.
- Invalid function definitions or calls. For example, missing a colon in a function definition or missing parentheses in a function call.
- Invalid variable declarations. For example, starting the variable name with a number or using invalid characters.
- Missing operators. For example, missing the
+operator when trying to add two numbers.
Good luck,
Monica