minus-squareasignz@kbin.socialtoAsklemmy@lemmy.ml•in python, how do i check if an user boolean input is true or falselinkfedilinkarrow-up2·edit-21 year agoJust use ‘strtobool’ from distutils to parse str as bool much better than reinventing the wheel https://docs.python.org/3.11/distutils/apiref.html#distutils.util.strtobool edit: ok it uses if internally so without if you could do it with match statement linkfedilink
Just use ‘strtobool’ from distutils to parse str as bool much better than reinventing the wheel https://docs.python.org/3.11/distutils/apiref.html#distutils.util.strtobool
edit: ok it uses if internally so without if you could do it with match statement