Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def backward_string_by_word(text: str) -> str:
- return text
- if __name__ == '__main__':
- print("Example:")
- print(backward_string_by_word(''))
- # These "asserts" are used for self-checking and not for an auto-testing
- assert backward_string_by_word('') == ''
- assert backward_string_by_word('world') == 'dlrow'
- assert backward_string_by_word('hello world') == 'olleh dlrow'
- assert backward_string_by_word('hello world') == 'olleh dlrow'
- assert backward_string_by_word('welcome to a game') == 'emoclew ot a emag'
- print("Coding complete? Click 'Check' to earn cool rewards!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement