How to do IF statements?
madmonster (14)

I learnt python from a book which is outdated. It was a book published in 2013 and its IF statements that don't work.

You are viewing a single comment. View All
abc3354 (208)

I don't think that the if statements changes between python version however :

#Simple if/else
if condition:
    print("do something")
    print("do something else")
# You must use always the same indentation

print("do something in one line") if condition

You may find a beginner course if you course is outdated, you can find online courses.
Maybe someone else knows a good course ?

Replit helper here !
If you found my answer helpful, you can upvote :)