Python function calling -
i've started learning python. if wrote:
def questions(): sentence= input(" please enter sentence").split()
how end function if user didn't input , hit enter
def questions(): sentence= input(" please enter sentence").split() if sentence == []: #this happens when nothing entered else: #this happens when entered
Comments
Post a Comment