Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

How to comment a couple of lines in the code editior?

Hi,
sometimes I want to comment on a couple of lines to disable/enable them, is there a way to do so instead of insert a "#’ sign one by one?

thanks

Triple-quoted strings:

while True:
    '''
    # wrong code
    if condition1:
        hero.command(paladin, "move", Vector(paladin.pos.x + 1, paladin.pos.y))
    if condition2:
        hero.command(paladin, "move", Vector(paladin.pos.x - 1, paladin.pos.y))
    '''

indent the ''' to avoid an IndentationError

3 Likes

thanks mate, this helps