파이썬 숫자(decimal, digit, numeric) 구분 - str.isdecimal(), str.isdigit(), str.isnumeric() 메소드


파이썬 숫자(decimal, digit, numeric) 구분 - str.isdecimal(), str.isdigit(), str.isnumeric() 메소드

본 포스팅에서는 Python에서 숫자를 표현하는 문자(character)를 decimal(십진수), digit(숫자), numeric(수)로 구분하고, 문자열 메소드(string method) 중 str.isdecimal(), str.isdigit(), str.isnumeric()에 대해 알아보겠습니다. 영어에서는 decimal, digit, numeric으로 수를 구별하고 있으나, 우리 한글에서는 숫자로 통칭하고 있어 그 구별이 쉽지 않습니다. Python에서는 숫자를 표현하는 문자, 예를 들어 '1'을 decimal, digit, numeric으로 각각 구분하여 표현합니다. 그렇다면, 각각의 차이는 무엇인지 알아보겠습니다. 구분 내 용 예) decimal 십진수를 표현하는 문자 각 나라 고유의 십진수 문자 0 1 2 3 4 5 6 7 8 9 ၀ ၁ ၂ ၃ ၄ ၅ ၆ ၇ ၈ ၉ (미얀마 십진수) digit decimal + 위 첨자(superscript) 십진수 아래 첨자(subs...


#파이썬_decimal #파이썬_숫자 #파이썬_수_구분 #파이썬_수 #파이썬_분수 #파이썬_로마숫자 #파이썬_numeric #파이썬_isnumeric #파이썬_isdigit #파이썬_isdecimal #파이썬_digit #파이썬_첨자

원문링크 : 파이썬 숫자(decimal, digit, numeric) 구분 - str.isdecimal(), str.isdigit(), str.isnumeric() 메소드