how to test for nan python code example Example: how to check if a string value is nan in python if(term != term): print("it's a nan value")