def assert_contains(haystack, needle):
 if (needle not in haystack):
  raise AssertionError(('item %r not found in collection %r' % (needle, haystack)))

def assert_contains ( haystack , needle ) : if ( needle not in haystack ) : raise AssertionError ( ( 'item %r not found in collection %r' % ( needle , haystack ) ) )
check if needle is in haystack .