How to make parentheses bold in a string?

Python: Removing parentheses and string in between them?

  • Question: This function remove_parentheses(s) takes one string parameter s, and returns that same string in which all text in between parentheses has been removed, including the ...show more

  • Answer:

    In Python, it is important to show indentation (which Y!A removes) so either use "--- " for each indentation level, or use #end comments to delimit blocks, or use a code-posting site and post the link here. def remove_parentheses(s): --- result = "" --- flag = True --- for c in s: --- --- if c == "(": flag = False --- --- if flag: result += c --- --- if c == ")": flag = True --- return result

LPYYHYF7R4VWT62VDWFJO4SSFM at Yahoo! Answers Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.