list = ['SD', 'Austin']s = 'SDM\Austin'for l in list: if l in s: print '"{}" exists in "{}"'.format(l, s);
Standard input is empty
"SD" exists in "SDM\Austin" "Austin" exists in "SDM\Austin"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!