You should create functions for the common code. For example each car will have a sale price and a tax level, so those values only need to be set once for any type. Each car offers extended warranty so that code can go into a common function. The main part of the program should offer the different types of car and then call a function to handle the specific details, and any other common parts of the code. So the structure should be something like:
def electric():
def hybrid():
return 5000, 10
def get_warranty():
answer = input("Do you need extended warranty?")
if answer == "Y" or answer == "y":
extended = 3000
else
extended = 0
return extended
base_cost = 0
tax_rate = 0
warranty = 0
base_cost, tax_rate = hybrid()
warranty = get_warranty()
total_cost = base_cost + ...