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

c# - Unity IoC Lifetime per HttpRequest for UserStore -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -

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