Skip to content

Programming FAQ: code golfing is easier with walrus operators #144056

@johnslavik

Description

@johnslavik

Documentation

In https://docs.python.org/3/faq/programming.html#is-it-possible-to-write-obfuscated-one-liners-in-python, let's mention walrus operators. While not necessarily great at "obfuscating", it's a more modern technique for golfing or esoteric programming.

See also https://github.com/johnslavik/oneliners/blob/b4442b081807ec40308b8f8abfdb7bf89b5f7e53/guessing_game.py.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions