How To Create A Lambda Function In Python With If Statement