Super noob question

ok, so…when using parentheses, python does the helpful thing and automatically includes the closing quote…accept for the noob, it creates and extra key stroke…and it stays colored blue as well. what is the proper way to use this? ive tried like tab, enter, etc, and it erases it and such. i know im missing a step here.

You mean you are trying to type a single ( or " without the editor automattically adding ) or a second "?

1 Like

Some of it depends on what you are trying to do in the code and whether the editor recognizes your syntax, I think. If you are calling a function, for example, the code editor puts the two white parentheses by default.

For example, in Python, if I have a function named abc, and I want to call it, I will write:

abc()

As soon as I type that open parenthesis, the code editor will add the closing one for me, as long as my indents, etc. are consistent with calling a function - which is to say, it’s on a new line, and it’s indented properly to not be included with another block of code.

From what I can tell, it does highlight the parentheses in my code editor if I delete a closing parenthesis, mainly I think to tell me which opening parenthesis is paired with which closing one, because depending on your code, you can have nesting, or one inside the other, like:

(a * (b+c))

Hope that helps some.

i need to spend some more time learning a thing or two so i can properly ask this question. im sure it wont seem wrong or out of place or be a problem once i get rolling i will come back in a month…