HomePython Write a Python program to convert true to 1 and false to 0 Vikram somai October 30, 2021 0 Comments Facebook Twitter Write a Python program to convert true to 1 and false to 0code:-x = 'true'x = int(x == 'true') print(x) x = 'abcd' x = int(x == 'true') print(x) output:-10>>> Tags Python Facebook Twitter
Post a Comment
If you have any doubts, Please let me know
Thanks!