Ok b works now, but c is just selecting all names. Am I using the right variable? I'm using jobs, not a previous one that's already assigned to something else.
1 min to spare?
def c(): found = False jobs = input("Enter the job title: ") for jobs in employees: if len(i)==5: print('%-30s' % (jobs[4]+ ','+' '+jobs[3])) found = True if len(i)==6: print('%-30s' % (jobs[5]+','+' '+jobs[3]+' '+jobs[4])) found = True if len(i)==7: print('%-30s' % (jobs[6]+','+' '+jobs[3]+' '+jobs[4]+' '+jobs[5])) found = True if found == False: print("There is no such job")
Output:Select an option from 1 - 3 (0 to quit): 3
Enter the job title: wizard
Simpson, Bart
Flanders, Ned
Simpson, Lisa
Granger, Hermione
Potter, Harry
Shmoikel, Herschel
Ibrahimovic, Zlatan
Southgate, Gareth
Klopp, Juergen
T, Mike
Laurie, Adele
Capaldi, Peter
Christopher, Edward
Flintstone, Wilma
1 min to spare?