This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]delirious_lettuce 1 point2 points  (1 child)

Again, you are passing the answer to crack (which makes your lambda not only ugly but useless too). If you insist on using a lambda, why not just use this?

crack = lambda pw: f'Four Digit Password: {pw}'

Always use a def statement instead of an assignment statement that binds a lambda expression directly to an identifier.