Aug-26-2019, 04:34 AM
You can try this
husbands=[('ginny','harry'),('eve','adam'),('lizzy','darcy'),('rose','jack')] wife=input('write wife name here = ') for x in husbands: if wife == x[0]: loved = x[1] print('her husband is ',loved) break elif wife != x[:]: continue else: print("Name is not available")