![]() This means we should make the input in a standardized format. Otherwise, we have to consider three different cases that we call range(), namely, range(10), range(2,10), and range(2,10,3), which will make our while loop more complicated and error-prone.Īnother reason to sanitize the input is for canonicalization. ![]() Then, the while loop can be written as such. But with the two if statements at the beginning of the function, we know there are always values for variables a, b, and c. This is a simplified version of range() that we can get from Python’s built-in library. ![]()
0 Comments
Leave a Reply. |