def __setitem__(self, item, value):
        """Enable the use of the [] notation on NoteContainers.

        This function accepts Notes and notes as string.

        Example:
        >>> n = NoteContainer(['C', 'E', 'G'])
        >>> n[0] = 'B'
        >>> n
        ['B-4', 'E-4', 'G-4']
        """
        if type(value) == str:
            n = Note(value)
            self.notes[item] = n
        else:
            self.notes[item] = value
        return self.notes
def __setitem__ ( self , item , value ) : if type ( value ) == str : n = Note ( value ) self . notes [ item ] = n else : self . notes [ item ] = value return self . notes
Enable the use of the [] notation on NoteContainers.

        This function accepts Notes and notes as string.

        Example:
        >>> n = NoteContainer(['C', 'E', 'G'])
        >>> n[0] = 'B'
        >>> n
        ['B-4', 'E-4', 'G-4']