226k views
2 votes
What symbol goes at the end of every if/else statement in python?

1 Answer

4 votes

A colon goes after every if/else statement in python. For instance:

if 1 < 5:

# do something.

As we can see, a colon is placed after the 5.

User Max Fomin
by
3.5k points