I have an employee record, and It will ask them to enter their name and job and add both these elements to a tuple. I have done it so that it first adds to a list and then converts to a tuple.
However i want to print only the employee name not the job aswell.
I tried to make the final line print(mytuple[0]) but this doesn't work either.
record=[] mytuple=() choice = "" while (choice != "c"): print() print("a. Add a new employee") print("b. Display all employees") choice = input("Choose an option") if choice == "a": full_name = str(input("Enter your name: ")).title() record.append(full_name) print(record) job_title = str(input("Enter your job title: ")).title() record.append(job_title) print(record) elif choice == "b": print("Employee Name:") for n in record: mytuple=tuple(record) print(mytuple)