Delete multiple lines in nano

For example, when doing $ sudo nano /etc/hosts in the Terminal on Mac.

  1. Move cursor to start of line and type Ctrl + K
  2. Repeat
  3. (Type Ctrl + X to quit)