A photo gallery should only accept image uploads. Given a filename name, return True if it ends with .png, .jpg, .jpeg or .gif, ignoring the case of the extension, and False otherwise.
Examples
Input: name = "holiday.JPG"
Output: True
Input: name = "notes.txt"
Output: False
Input: name = "png"
Output: False
Constraints
0 <= len(name) <= 200namemay contain letters, digits, dots, spaces, dashes and underscores
Goals
- Check a suffix with `endswith`
- Compare case-insensitively
- Test against several options