This is just a section from my python code that I want to restart from the start of the program in the 'else' section. Can somebody please help me by telling me what code i need to add in the 'else' section to make my program restart from the beginning.
Thanks.
if fuelType == "Petrol":
minPetrolPrice = min(list1)
minPetrolPriceIndex = list1.index(min(list1))
minPetrolPriceName = namelist[minPetrolPriceIndex]
print("The cheapest price of petrol today is: "), minPetrolPrice
print("")
print("This can be found at"),minPetrolPriceName, ("petrol station ")
print("The average price of petrol at all the stations today is:"),avgPetrol
print("Just in case you were intersted, the average price of diesel today is:"),avgDiesel
elif fuelType == "Diesel":
minDieselPrice = min(list2)
minDieselPriceIndex = list2.index(min(list2))
minDieselPriceName = namelist[minDieselPriceIndex]
print("The cheapest price of diesel today is: "), minDieselPrice
print("")
print("This can be found at"),minDieselPriceName, ("petrol station ")
print("The average price of diesel at all the stations today is:"),avgDiesel
print("Just in case you were intersted, the average price of petrol today is:"),avgPetrol
else:
print("You did not enter a valid option")
print("Please try again!")
#I want it to restart the whole program from this point