I dont know why it is not reversing, I am new and would appreciate some help.
class Solution:
def reverseString(self, s: List[str]) -> None:
"""
Do not return anything, modify s in-place instead.
"""
List = ["h","e","l","l","o"]
List.reverse()
for i in reversed(List):
print(i)
and I get this output:
Traceback (most recent call last): File "main.py", line 1, in class Solution: File "main.py", line 2, in Solution def reverseString(self, s: List[str]) -> None: NameError: name 'List' is not defined