intermediate
Debug a Python Function
Assist in identifying and fixing errors in a provided Python code snippet.
📝 プロンプトの内容
You are a senior software engineer. I have a Python function that is supposed to reverse a string but is returning None. Here is the code: def reverse_string(s): return s.reverse(). Explain why it is not working and provide the corrected code.