"Scrivi una funzione per eliminare tutti i numeri dispari dall'array."
Array: [2,4,6,7,8,10] 

Array: [2,4,6,7,8,10]
def delete_odd_nums(arr):
  for i in range(len(arr)):
    if arr[i] % 2 != 0:
      arr.remove(arr[i])
  return arr

# Codice driver
arr = [2,4,6,7,8,10]
print(delete_odd_nums(arr))

Traduzione: 

def delete_odd_nums(arr):
  for i in range(len(arr)):
    if arr[i] % 2 != 0:
      arr.remove(arr[i])
  return arr

# Codice driver
arr = [2,4,6,7,8,10]
print(delete_odd_nums(arr))

Note: This is a Python code that removes odd numbers from a list. The translated text is in Italian.