Skip to content

Instantly share code, notes, and snippets.

@maor365scores
Last active August 11, 2021 13:28
Show Gist options
  • Save maor365scores/42d276420b907b1b8e5b2b2b79633959 to your computer and use it in GitHub Desktop.
Save maor365scores/42d276420b907b1b8e5b2b2b79633959 to your computer and use it in GitHub Desktop.
str = "Id,name\\n1,Jessy\\n2,NULL\\n"
def removeNull(str):
splited = str.split(',')
toReturn = ','.join([word for word in splited if 'null' not in word.lower()])
return toReturn
print(removeNull(str))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment