mercredi 27 avril 2016

Wrote a nested if else procedure that returns the answer AND "none". Why?

def is_friend (name): if name[0] == 'D': print 'yes' else: if name [0] == 'N': print 'yes' else: print 'no'

print is_friend ('Eric') no None

Aucun commentaire:

Enregistrer un commentaire