def state_name(sname):
 return sname.split('.', 1)[0]

def state_name ( sname ) : return sname . split ( '.' , 1 ) [ 0 ]
return the name of the state regardless if sname is just the state name or a state .