Pregunta de entrevista de Thomson Reuters

Using Python, write a function to reverse a linked list. Explain the time and space complexity of your solution.