sovabids.misc
¶
Module with misc utilities for sovabids.
Module Contents¶
Functions¶
|
Count the number of non-nested balanced parentheses in the string. If parenthesis is not balanced then return -1. |
Return the number of digits of the given number N. |
- sovabids.misc.flat_paren_counter(string)[source]¶
Count the number of non-nested balanced parentheses in the string. If parenthesis is not balanced then return -1.
- Parameters
string (str) – The string we will inspect for balanced parentheses.
- Returns
The number of non-nested balanced parentheses or -1 if the string has unbalanced parentheses.
- Return type
int