DEV Community

DDSRY
DDSRY

Posted on • Updated 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)