The following code gives me the error
d = {1: 2, 3: 4} if 1 in d: print('true!') else print('no true!') else print('no true!') ^ SyntaxError: invalid syntax
How can I combine else and if in?
Aucun commentaire:
Enregistrer un commentaire