For the following list:
test_list = ['one', 'two','threefour']
How would I find out if an item starts with 'three' or ends with 'four' ?
For example, instead of testing membership like this:
two in test_list
I want to test it like this:
startswith('three') in test_list
.
How would I accomplish this?