def primitive_delete(course, num):
 tabs = course.tabs
 validate_args(num, tabs[num].get('type', ''))
 del tabs[num]
 modulestore().update_item(course, ModuleStoreEnum.UserID.primitive_command)

def primitive_delete ( course , num ) : tabs = course . tabs validate_args ( num , tabs [ num ] . get ( 'type' , '' ) ) del tabs [ num ] modulestore ( ) . update_item ( course , ModuleStoreEnum . UserID . primitive_command )
deletes the given tab number .