distance = [3, 2, 4]
price = [4, 5, 2, 6]
city_street = 0
low_idx = 0
answer = 0
for i in range(len(price)):
    if price[i] < price[low_idx]:
        low_idx = i

for j in range(low_idx):
    city_street += distance[j]

answer = city_street * price[0]
print(answer)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: