This question already has an answer here:
arr1=[6,4,2,8] arr2=[1,5,4,8,2] for n in arr2: if n not in arr1: arr1.append(n) print(arr1)
javascript
if statement
Aucun commentaire:
Enregistrer un commentaire