Solution() takes no arguments
时间: 2023-09-28 10:07:41 浏览: 121
The error message "Solution() takes no arguments" indicates that you are trying to call a method or function without providing the necessary arguments.
For example, if you have defined a function called "hello" that takes a name as an argument, like this:
```
def hello(name):
print("Hello, " + name)
```
You would need to call the function with a name argument, like this:
```
hello("Alice")
```
If you call the function without any arguments, like this:
```
hello()
```
You will get the "TypeError: hello() takes exactly 1 argument (0 given)" error message, because the function expects one argument (the name), but you didn't provide any.
To fix the "Solution() takes no arguments" error, you need to make sure that you are calling the method with the correct number and type of arguments. You may need to check the method's documentation or the code where it is defined to see what arguments it expects.
阅读全文