I have a list as follows:
[u'12:13-internet-wifi-primary', u'26:27-broadcom-wifi']
From this i need to grep the element using keyword as "primary" and return output as
12:13-internet-wifi-primary
i used as follows
if (i <= (len(system_info['Ad_List']))):
ss = system_info['Ad_List']
print type(ss)
searchObj = "primary"
#if 'primary' in ss:
if any(word in searchObj for word in ss):
print "inside if"
print searchObj
else:
print "inside else... No search obj"
Always it gets into else part..
How to do it.. split,find are not list attributes