How do I loop over a list in Python. I tried using for ch in sample_list
but it only goes through one item in the list.
sample_list = ['abc', 'def', 'ghi', 'hello']
for ch in sample_list:
if ch == 'hello':
return ch
How do I make it work?