MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / associativity

Function associativity

data_structures/stacks/infix_to_postfix_conversion.py:37–42  ·  view source on GitHub ↗

Return the associativity of the operator `char`. https://en.wikipedia.org/wiki/Operator_associativity

(char: str)

Source from the content-addressed store, hash-verified

35
36
37def associativity(char: str) -> Literal["LR", "RL"]:
38 """
39 Return the associativity of the operator `char`.
40 https://en.wikipedia.org/wiki/Operator_associativity
41 """
42 return ASSOCIATIVITIES[char]
43
44
45def infix_to_postfix(expression_str: str) -> str:

Callers 1

infix_to_postfixFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected