You could write this as a lambda, but you really, really shouldn't.
First, you have to convert each statement to an expression. There are multiple steps here, and every single one of them is a bad idea.
if c in f: f.remove(c) becomes f.remove(c) if c else 0. It's very unpythonic to use functions called only for their side-effects inside an expression like this, but it's not illegal. We just have to take into account the fact that f.remove(c) always returns None, and pick something else we can put in the other branch.
Now, that doesn't do an early return, because that's impossible; you can't have a return statement, or any statement, inside an expression. We'll get back to that later.
Next, the for statement has to become some kind of comprehension, in this case a generator expression: (f.remove(c) if c in f else 0 for c in s). Notice that we're putting the values None and 0 into an iterator, even though we don't actually care about those values, so this is a misuse of comprehensions, but again not illegal.
And now we can handle the "early return" by using the all function: all(value is None for value in (f.remove(c) if c in f else 0 for c in s)). That will be True if every value is None, but as soon as it finds one that isn't (because c in f was false) it will stop, and evaluate to False. And we can turn that False into 0 and True into 1 just by calling int on it (or using 1 if foo else 0, but why bother trying to be Pythonic at this point?) so:
z = lambda s, f: int(all(value is None for value in
(f.remove(c) if c in f else 0 for c in s))
Of course this is a misuse of lambda, since the entire point of lambda is that it gives us an anonymous function that can be defined in the middle of an expression; if you want to define it in a statement and give it a name, all you're doing by using lambda instead of def is obfuscating your code.
You can collapse the two loops into one if you want, and make various other changes to make it more concise if you're going for code golf.
remove; its that you're trying to use list comprehension/generator expression syntax without being in a list comprehension or a generator expression.lambdainstead of adef? Second, it's a really bad idea to use comprehensions, conditional expressions, lambda, etc. for things only being run for side effects.lenand==to get the 0 or 1?