Trying to make a program that provides the price to different numbers of stages. In "tripss.txt",third line is the number 12, python interprets it as 1 and 2 instead and gives the price for each rather than the number as a whole, any way to fix it to that it's read as 12?.
infile = open("tripss.txt","r")
customer_one= infile.readline().strip("\n")
customer_two= infile.readline().strip("\n")
customer_three= infile.readline().strip("\n")
one_to_three_stages="euro 1.55"
four_to_seven_stages="euro 1.85"
seven_to_eleven_stages="euro 2.45"
more_than_eleven_stages="euro 2.85"
cheapest = ["1","2","3"]
cheap = ["4","5","6","7"]
expensive = ["7","8","9","10","11"]
for number in customer_three:
if number in cheapest:
print one_to_three_stages
elif number in cheap:
print four_to_seven_stages
elif number in expensive:
print seven_to_eleven_stages
else:
print more_than_eleven_stages