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

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -