Why am I getting this error in the very basic Python script? What does the error mean?
Error:
Traceback (most recent call last): File "cab.py", line 16, in <module> if cab in line: TypeError: 'in <string>' requires string as left operand, not int
Script:
import re import sys #loco = sys.argv[1] cab = 6176 fileZ = open('cabs.txt') fileZ = list(set(fileZ)) for line in fileZ: if cab in line: IPaddr = (line.strip().split()) print(IPaddr[4])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With