为什么我不能这样做?
extout = os.path.splitext(args.outputfile)[1].lower()
if extout != (".csv" | ".xml"): # <------- creates error
sys.stderr.write('ERROR: Invalid extension or none found. This program only recognizes .csv or .xml extensions %s\n')
sys.exit(1)
这给了我一个类型错误:
Unsupported operand types for |: 'str' and 'str'