code: def remove_tab(self, tab=0):
          
  
          # pop it from the list
          t = self.tabs.pop(tab)
  
          # remove it from the gui
          self._widget.removeTab(tab)
  
          # return it in case someone cares
          return t
docs: Removes the tab by index.