(self)
The final component's last suffix, if any.

        This includes the leading period. For example: '.txt'
The final component's last suffix, if any.
The final component s last suffix if any .
def suffix(self):
        """
        The final component's last suffix, if any.

        This includes the leading period. For example: '.txt'
        """
        name = self.name
        i = name.rfind('.')
        if 0 < i < len(name) - 1:
            return name[i:]
        else:
            return ''
def suffix ( self ) : name = self . name i = name . rfind ( '.' ) if 0 < i < len ( name ) - 1 : return name [ i : ] else : return ''