![]() Canonicalized input is easier to check for conformation (e.g., we know /etc/passwd contains sensitive system data, but we’re not so sure about /tmp/./etc/././passwd). For example, a URL should start with “ and a file path should always be a full absolute path like /etc/passwd instead of something like /tmp/./etc/././passwd. 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. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |