new to programming. I have an issue where I need to modify a loop that searches a list in order to use indexes and start at index 1.
# find the coldest day in a range of daily temps
## input: 7 days worth of temps
temps = [7, 4, 1, -9, 18, 32, 10]
## output: lowest temp among the list
coolest = temps[0]
for temperature in temps:
if temperature < coolest:
coolest = temperature
print (coolest)
I want to change this so that we start at index 1, since using the current implementation causes a redundant step on the first iteration.
Many thanks, Michael