I have a file which contain entries in the following format:
FID=COST|Tolerance=1
FID=(BUY,SELL)|Tolerance=0
FID=[(X,Y),(A,B)]|Tolerance=0
What would be the best way to find out if FID
is a string, tuple or list while reading the file?
A normal isinstance
test of the value of FID immediately after reading wont work. Appreciate any help.