num_list = [1, 2, 3, 4, 5]
for number in num_list:
  if number < 3:
    print("smaller than 3")
  else:
    if number == 3:
      print("equal to 3")  
    else:
      print("larger than 3")
num_list = [1, 2, 3, 4, 5]
for number in num_list:
  if number < 3:
    print("smaller than 3")
  elif number == 3:
    print("equal to 3")  
  else:
    print("larger than 3")
Refactoring del codice seguente.