def append_period(text):
 if (text[(-1)] == '"'):
  return (text[0:(-1)] + '."')
 return text

def append_period ( text ) : if ( text [ ( - 1 ) ] == '"' ) : return ( text [ 0 : ( - 1 ) ] + '."' ) return text
append a period at the end of the sentence .