What exactly is the meaning of comparing one string to another using greater (>) or lesser (<) operators and get true of false, like in this code:
shopping_list=['heineken', 'patagonia', 'backer', 'austria', 'heisenbhan']
im_drinking='heineken'
for beer in shopping_list:
if beer==im_drinking:
print('yes, special one.')
elif beer>im_drinking:
print('good one')
else:
print('not this one, but I like it to')
this was the result when I ran the code:
yes, special one.
good one
not this one, but I like it to
not this one, but I like it to
good one