NameError: name 'true' is not defined
Python’s boolean constants are capitalized: True
and False
with upper case T
and F
respectively.
The lower-case variants are just valid free names for variables, so you could use them for whatever you want, e.g. true = False
(not recommended ;P).
while True:
# but seems like inifite loop
You haven't defined a variable true
. Maybe you meant the built-in boolean value True
?