I am trying to make a MS-DOS like program like python. I am adding a system to see if a command exists. the file "known.txt" contains:
['catfish', 'cls', 'dl', 'hello', 'help', 'help1', 'help2', 'info', 'logout', 'ping', 'run', 'stop', 'time']
This is the code i am using to run it:
if pnt in open('known.txt').read():
sys.path.insert('F:/Term/commands/')
answermodule = importlib.import_module(cmd)
but when i run it, i get this:
TypeError: 'in <string>' requires string as left operand, not tuple
how could i fix this?