📅  最后修改于: 2022-03-11 14:46:21.595000             🧑  作者: Mango
fruits = ["apple", "orange", "banana", "orange", "mango", "strawberry", "lichi", "tangerine", "kiwi", "pineapple"]
start_from = 1
end_before = 8
increment_by = 2
for i in range(start_from, end_before, increment_by): # This will not work for sets as sets are not ordered
print(f"{i + 1}. {fruits[i]}")