How to code in python on mac7/9/2023 Command + K then Command + U if you’re on a Mac.Ctrl + K then Ctrl + U if you’re on Windows.To uncomment a block of code, use your mouse to select it and then use the key combination: Command + K then press Command + C if you’re on a Mac.Ctrl + K then press Ctrl + C if you’re using Windows.All you need to do is select that code block with your mouse, then press the following key combination: Advertisements Advertisements Solutionįortunately, if you use Visual Studio Code, commenting a block of code is really quick and easy. If a block of code had hundreds of lines, it would be terrible. To comment on a block of code in Python, you will have to prefix it with # line by line. So how to comment out a block of code in Python? If you have worked with some other programming language like Javascript, Dart … then you will be familiar with / * * / syntax. To comment out a line of code in Python, you can add a # before that line.
0 Comments
Leave a Reply. |