DEV Community

DDSRY
DDSRY

Posted on • Edited on

Why do we have to put quotes around "strings" but not around True or False in Python ?

Why do you put quotes around "strings" but not around True or False in Python Programming Language ?

▪ That's because Python recognizes True and False as keywords.

▪ Representing
the concept of True and False.

▪ If you put quotes around them, then they are turned into strings and won't work.

Top comments (0)