Black
66
%Off
November
0d: 00h: 00m: 00s

🎁 Get 2 extra months of learning — completely FREE

That's 60 extra days to master new skills, build more projects, and land your dream job.

Become a PRO
Background Image

🎁 Get 2 extra months of learning completely FREE

Become a PRO
MONG QI SHENG Moe
last year
Mongcountry asked

How to write if than in Phyton

Sudip Bhandari
Expert
last year

In Python, we use the if...else statement to make decisions. For example:

age = 19

if age >= 18:
    print("The person can enter inside the club.")
else:
    print("The person cannot enter inside the club.")

We have a dedicated lesson on if...else, so you’ll learn more about it as you continue the course.
For now, I recommend just keeping the flow and moving forward step-by-step.

If you want to jump ahead and learn about it right now, you can visit: if...else Statement | Programiz PRO

Hope this helps!

Python
This question was asked as part of the Learn Python Basics course.