I have a config.ini file like this:
[LABEL]NAME = "eventName"
And I am reading it into my python code as shown below. However, when I compare it with the exactly the same string, the result is False
. I wonder if I should use a different way to read this or I need to do something else?
import configparserconfig = configparser.ConfigParser()config.read('config.ini')my_label_name = config['LABEL']['name']print("My label is: ", my_label_name, " and has type of: ", type(my_label_name))My label is: "eventName" and has type of: <class 'str'>print(my_label_name == "eventName")False