Skip to content
Advertisement

Name ‘ ‘ is not defined – python

from bunch of files I want to extract some info (code is below), but I came across error: “name ‘GH_Pos21X_true’ is not defined”, full error:

JavaScript

Where should I defined it?

Code:

JavaScript

I can’t see a problem, maybe someone could help me find my mistake? I will be grateful.

If I don’t set this variable as global I have this error:

JavaScript

Part of the file – example:

JavaScript

Advertisement

Answer

You are using the == comparison operator instead of the assignment operator =

Do this instead

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement