목록변환 (1)
IT Log

int float str bool type() 해당 데이터타입을 모르거나 확인이 필요한 경우 사용 # data type을 확인 type(123) type(12.3) type('123') type([]) type({}) type(()) # type 확인 결과 int() 해당 데이터를 int type으로 변환. 문자형의 경우 변환할 수 없음. int(1.23) int('123') int('a') # 실행결과 1 123 value error float() 해당 데이터를 float type으로 변환. 문자형의 경우 변환할 수 없음. float(12) float('12') float('-123') float('1e-003') float('a') # 실행결과 12.0 12.0 -123.0 0.001 error st..
Python
2021. 6. 6. 16:26