Not sure whether the subject is correct, but I would like to use short IF instruction in such code:
arr.append( data if not data in arr )
But this code returns:
SyntaxError: invalid syntax
Is there any other option?
Thanks.
Aucun commentaire:
Enregistrer un commentaire