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.