Jul-27-2021, 10:45 PM
(This post was last modified: Jul-27-2021, 10:45 PM by eddywinch82.)
Hi shen123,
the following worked for me, is this the type of thing, you were thinking of ? :-
Best Regards
Eddie Winch
the following worked for me, is this the type of thing, you were thinking of ? :-
animal = ['Lion', 'Zebra', 'Warthog', 'Elephant', 'Tiger', 'Hyena'] animal = 'Warthog' if animal == 'Lion': print('Meat') elif animal == 'Zebra': print('Grass') elif animal == 'Warthog': print('Water') elif animal in ['Elephant', 'Tiger', 'Hyena']: print('Already fed!') else: print('Animal not listed') print()If not, could you post the Full Code you have ?
Best Regards
Eddie Winch