Search code examples
pythonpycharm

How do I edit multiple lines at the same time in Pycharm


How do I erase all the angle brackets on all 6 lines at the same time? I am using Pycharm and studying off of notes in Notepad++>>>problem

The input is:

[input image][2]

The expected output is:

zork = 0
print('Before', zork)
for thing in [9, 41, 12, 3, 74, 15]:
   zork = zork + thing
   print(zork, thing)
print('After', zork)

please forgive the noobness


Solution

  • there is a shortcut for this called square selection. I usually use place the cursor on the starting point from where I have to delete the text, alt+ left_shift and click and scroll to the end where u want to delete.

    It should work perfectly in your case (Hopefully).