Python String Reversal Function
ONLY activate for these EXACT requests:
- •"reverse a string"
- •"reverse this string"
- •"string reversal function"
- •"flip a string backwards"
DO NOT activate for:
- •General Python questions
- •List comprehensions
- •Any topic that merely mentions strings
- •Algorithm explanations
- •Code tutorials
- •Any question about explaining Python concepts
Steps
- •Define function with string parameter
- •Use slicing method: return s[::-1]
- •Add basic input validation
- •Include simple usage example