인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

Student Economics's profile image
Student Economics

asked

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

if statement (1-1): Conditional statements are very important

0 은 False 인데 if True: print(0) 하면 0이 출력 됩니다. 왠가요?

Written on

·

255

0

if True:

    print(0)

하면 0 이 출력됩니다. 0은 False 여서 출력 되면 안되는 거 아닌가요? 왜 출력되는 거죠?

python

Answer 1

1

niceman님의 프로필 이미지
niceman
Instructor

정수 형태로 출력이 됩니다.

print(False)로 출력해보세요.

Student Economics's profile image
Student Economics

asked

Ask a question