DEV Community

Discussion on: Daily Challenge #310 - Boolean to String Conversion

nijeesh4all profile image
Nijeesh Joshy • Edited on


there already exists a function to_s.

If you want another one, here it is

def bool_to_s(str)
Enter fullscreen mode Exit fullscreen mode

It will work without the !! I just wanted to make sure it will work even if anything else is passed