Update page 'Day 2 homework - Sloetjes'

xuanyi.wang
2023-03-31 18:23:42 +02:00
parent 9e2c908fae
commit 52cfbb9736
+1 -1
@@ -154,7 +154,7 @@ def validate(input_string):
raise ValueError("Crime detected!")
```
In this example of the function, we check if the input string contains the `"\r"` character using the in keyword, and raise a `ValueError` exception if it does. This ensures that any input containing the `"\r"` character is explicitly disallowed and treated as potentially malicious.
In this example of the `validate()` function, we check if the input string contains the `"\r"` character using the in keyword, and raise a `ValueError` exception if it does. This ensures that any input containing the `"\r"` character is explicitly disallowed and treated as potentially malicious.
We can then use this `validate()` function in the test cases as follows: