Edit a line in a file depending on user’s input | Python

I’m working on a contact book application to improve my python skill, so far I’ve created functions to add new contact, view existing contact, but I’m stuck on a function to edit them, I don’t know how to tackle this task (note that editing and adding information is based on user input), currently the only information this application is recording are name, phone number and/or email (if user entered an email).

creating multiple columns in a for loop python

I’m new to Python.
I’m trying to create multiple columns in a for loop but I’m having trouble with it.
I have several columns and I’m trying to create a new column that shows whether or not the elements in ohlcs is greater than elements in metrics. I can do it to create one column but I want to save time since I plan on doing the same function but for different variables.

I’m fairly new to python coding so I’m trying to challenge myself to do elif statements and I can’t find how to fix this problem

So here is my code and I can’t see what causes the error. foods = int(input("What is your favorite food?: ")) if foods == apple: print("you like fruits!") elif foods == pork: print("you like meat!") elif foods == egg: print("you like poultry!") The error is line 3, in <module> foods = int(input("What is your favorite … Read more