Live Templates

    Create new 🔗

    Source: https://www.jetbrains.com/help/pycharm/creating-and-editing-live-templates.html

    TLDR 🔗

    • Go to Settings -> Editor -> Live Templates
    • Copy a similar one and paste it (ensure to define contexts in which it can be used)

    Details 🔗

    For details see instructions from source.