자료형

tacoyaggi ㅣ 2024. 4. 11. 08:22

str(문자열) 

print(type('a'))
print(type('안녕하세요.'))
print(type("A"))
print(type("안녕하세요."))



int(정수형)

print(type(1))
print(type(100))
print(type(-500))

 

float(실수형)

print(type(0.1))
print(type(-10.99))
print(type(100.00))

 

bool(참거짓)

print(type(True))
print(type(False))
print(type(1 > 2))
print(type('타코' == '타코'))

 

'SW 기능 > python' 카테고리의 다른 글

문자열  (0) 2024.04.16
function  (0) 2024.04.11
연산자  (0) 2024.04.11
python 기본 문법  (0) 2024.03.26