Skip to content

Commit 945be56

Browse files
hollowcrustcclauss
andauthored
Update print_width
Co-authored-by: Christian Clauss <[email protected]>
1 parent 138449c commit 945be56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: data_structures/stacks/infix_to_prefix_conversion.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def infix_2_postfix(infix: str) -> str:
2727
"-": 1,
2828
} # Priority of each operator
2929

30-
print_width = len(infix) if len(infix) > 7 else 7
30+
print_width = min(len(infix), 7)
3131
# Print table header for output
3232
print(
3333
"Symbol".center(8),

0 commit comments

Comments
 (0)