Skip to main content
Docstrings 0 of 6 activities solved
  1. Docstrings Not yet read
  2. Docstrings: quiz Not yet read
  3. Bad Lines Not yet solved
  4. Bad Prints Not yet solved
  5. Bad Body Not yet solved
  6. New Docs Not yet solved
Next series Function flow
Docstrings

Bad Body

Sign in to hand in your solution and get feedback.

def force_palindrome(a_word: str) -> str: ''' This function creates a palindrome from a phrase by adding the reverse of the phrase to its end. Args: a_word (str): Any string of text Returns: str: a string twice as long with the reverse ''' return a_word + a_word[::-1] print(force_palindrome('AB'))