강의

멘토링

커뮤니티

Inflearn Community Q&A

aquarius923787's profile image
aquarius923787

asked

Getting Started with Programming: Introduction to Python (Inflearn Original)

Numeric type (1-1): The basis of calculation is numeric type.

Print(type(str1, boo, str2, flooat, int, dict)시 출력 오류

Written on

·

377

0

name error가 나옵니다.

print(type(str1)등 출력시, type만 출력이 됩니다.

이에 대해 문의 드립니다.

python

Answer 2

1

데이터 타입에 대한 코드는 문제가 없어 보입니다.

그 위에 있는 데이터 타입을 보여 주실 수 있을까요?

거기서 문제가 있는 듯 합니다.

----------------------------------------------

도움이 되었으면 우측하단 또는 좌측하단에 하트 한번만 눌러주세요 :)

또한, 해결이 안된 경우 답글 작성 부탁드립니다!

0

이미 해결 하셨겠지만,

print(type(str1)등 출력시, type만 출력이 됩니다.
=>
값을 출력하고 싶으시면,
print(str1)
라고 하시면 되고,
같이 출력 하고 싶으시면,
print(str1, type(str1))
라고 하시면 될 것 같습니다.

aquarius923787's profile image
aquarius923787

asked

Ask a question