i am going through some books on python in order to automate tasks like finding phrases in books and using different regex for different things. Programming can be useful in any field I feel. However right now I am putting together a cookbook and I'm wondering a couple of things. The first I can probably figure out myself 'How do I write so my print function so it isn't one endless line?' and also, my main question is 'how would I format this code to print out all recipes with the word 'egg' or 'eggs' when it is input?'
while True:
response = input()
if response == 'scrambled eggs':
print('2 eggs, 1 teaspoon mayonnaise or salad dressing, 1 teaspoon water (optional), 1 teaspoon butter, salt and pepper to taste. In a cup or small bowl, whisk together the eggs, mayonnaise and water using a fork. Melt margarine in a skillet over low heat. Pour in the eggs, and stir constantly as they cook. Remove the eggs to a plate when they are set, but still moist. Do not over cook. Never add salt or pepper until eggs are on plate, but these are also good without ')
if response == 'rice patties':
print('1 cup cooked rice, chopped 1/4 cup shredded Cheddar cheese, 1 egg beaten, 1 teaspoon minced garlic, 1/4 teaspoon salt, 1/4 teaspoon ground black pepper, 1/4 teaspoon chopped fresh parsley, 1 tablespoon vegetable oil. Step one: Mix rice, onion, Cheddar cheese, egg, garlic, salt, black pepper, and parsley in a bowl. Step two: Cover bowl with plastic wrap and refrigerate at least 30 minutes. Step three: Form rice mixture into 4 small patties. Step four: Heat vegetable oil in a large skillet over medium-high heat. Fry patties in hot oil until lightly browned, about 5 minutes per side.')
if response == 'french toast':
print('bread, eggs, milk, vanilla, syrup, butter, cinnamon')
if response == 'scrambled eggs':
print('eggs, cheese')
if response == 'close':
break
Assistance is greatly appreciated, as I have a girlfriend with a need for a recipe book and I said id make a better one than she could buy lol
Thank you in advance