Jul-13-2018, 04:38 PM
(Jul-12-2018, 03:58 PM)nilamo Wrote: As stated by buran, that doesn't look like a string. So I'll help as if it's not a string :)
Try this:
if "bids" in text: if any(99 == bid["price"] for bid in text["bids"] if "price" in bid): print("go") else: print("not 99") else: print("invalid text")
Actually I think it is indeed Json data at the source. I didn't really know much about that :(
But your code works actually pretty neat, so thank you!