Created
October 11, 2022 02:41
-
-
Save RaMSFT/afcd6c15ac76c2b7ab7e8c498966508a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def bool_to_string(flag): | |
| """Convert a boolean value to a string | |
| Args: | |
| flag (boolean): boolean value to convert into string | |
| Returns: | |
| string: boolean to string result | |
| """ | |
| return str(flag) | |
| input = False | |
| result = bool_to_string(input) | |
| print(f"input: {input}, input type: {type(input)}, output: {result}, output Type: {type(result)}") | |
| input = True | |
| result = bool_to_string(input) | |
| print(f"input: {input}, input type: {type(input)}, output: {result}, output Type: {type(result)}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment