CodyKochmann
9/22/2016 - 4:46 PM

exits if the input string is empty in python

exits if the input string is empty in python

def exit_if_empty(s):
    if(len(s.split(' ')) < 1): exit('error: empty value')