Answer the question
In order to leave comments, you need to log in
How not to "crutch" to represent an integer (int) as a ternary string in Python?
There is an integer x, and it needs to be converted to a ternary string.
For example,
to_ternary (6)
# "20"
to_ternary (8)
# "22"
to_ternary (15)
# "120"
bin (8)
# "0b1000"
bin (43)
# "0b101011"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question