Question #291906

Create a sequence of numbers from 15 to 25 and increment by 4. What is the index of the value 19


Expert's answer

# Create a sequence of numbers from 15 to 25
L = [i for i in range(15, 26)]

# Increment by 4
for i in range(len(L)):
    L[i] += 4

idx = L.index(19)
print("The index of value 19 is {}".format(idx))
LATEST TUTORIALS
APPROVED BY CLIENTS