We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 138449c commit 945be56Copy full SHA for 945be56
data_structures/stacks/infix_to_prefix_conversion.py
@@ -27,7 +27,7 @@ def infix_2_postfix(infix: str) -> str:
27
"-": 1,
28
} # Priority of each operator
29
30
- print_width = len(infix) if len(infix) > 7 else 7
+ print_width = min(len(infix), 7)
31
# Print table header for output
32
print(
33
"Symbol".center(8),
0 commit comments