Surrounding Blocks of Code with Language Constructs
The Surround with feature ( or Ctrl+Alt+T) lets you put expressions or statements within blocks or language constructs. This feature in PyCharm Edu applies to:
|XML/HTML /XHTML tags|| |
|Python statements|| |
Surrounding blocks of code
To surround a block of code
- Select the desired code fragment.
- Press Ctrl+Alt+T.
A pop-up window displays the list of enclosing statements according to the context.
- Select the desired surround statement from the list. To do that, use the mouse cursor, up and down arrow keys, or a shortcut key displayed next to each element of the list.