math.log
math.log2
math.log10
Returns the base-2 logarithm of a number.
math.log2(x)
아래 값을 입력하면 예제에 즉시 반영됩니다.
import
math
print
import math print(math.log2(8)) # 3.0 print(math.log2(1024)) # 10.0