For some reason , my code keeps returning a false reply even if the string is in the file. Here's my code:
def check(self):
self = str(self)
if self in config_file:
print ('Account exists')
if self not in config_file:
print ('Account doesn\'t exist')