Let's say I have the following list
List = ['Apple', 'Banana', 'Orange', 'Grapes']
From this I want to search Apple
I have to use the following code
if 'Apple' in List:
print "Found"
But I want to search the string which contains 'App'
what do I have to do?
I can use For
loop and if
statement combined.
for items in List:
if 'App' in items:
print "Found"
But is there any other way to do this process?