Check whether a string contains a None Type value python -


i writing csv file in python. when try open , read get:

typeerror: expected string or unicode object, nonetype found 

my question is, how can check before write whether string contains none type value.

thanks

you can use is not (which is recommended compare singletons none):

if some_string not none:     # write 

Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -