[Python] Boolean Data Type

সি++ এর মতোই এখানেও বুলিয়ান টাইপ রয়েছে। পার্থক্য শুধু এর ভ্যালুতে। সি++ এ বুলিয়ান ভ্যারিয়েবলের ভ্যালু হচ্ছে true অথবা false, পাইথনে হলো True অথবা False.

x = True
y = False

print(x, type(x))
print(y, type(y))

আউটপুট:

True <class 'bool'>
False <class 'bool'>

Comments

Popular posts from this blog

return keyword কী ?

[Python] Introduction

[GUIDE] UVa OJ - 375 - Inscribed Circles and Isosceles Triangles