In Python looping and or/if
I've been using a Long process but limited codes.But codes must be in short process but Infinite
print("Press[A] to add a fruit")
print("Press[B] to edit a fruit list")
['apple', 'banana', 'mango', 'orange']
Enter your choice:A
Enter a fruit to be added: apple A fruit is already exist in record no.1
my codes has limitation like
if fruit in choice 1 print a fruit is already exist in record no.1
if fruit in slot choice 2 print a fruit is already exist in record no.2
...... What is the short process for Infinite code in determining in what record sequence exist in list.
Aucun commentaire:
Enregistrer un commentaire