def myfun(): str1 = '' if not str1: print('This string is empty') else: print('This string is NOT empty') if __name__=="__main__": myfun()
This string is empty
def myfun(): str1 = 'Sateesh' if not str1: print('This string is empty') else: print('This string is NOT empty') if __name__=="__main__": myfun()
This string is NOT empty