"Close Match" variable comparison in event script

In the script below I am trimming a dataset to exclude rows where the “Approved_Workcenters” column does not match the local variable “wc”. The change I need to make is to keep rows from the dataset that match “wc” even as a partial match. For example, if wc = “G5-04E” and a row in the dataset has “G5-04E, G5-04W” in the “Approved_Workcenter” column, keep this row. Any suggestions?

rack1 = system.tag.read("[default]KanbanRackCalls/WeldRacksActual").value
	wc = system.tag.read("[.]../Workcenter").value
	rack2 = system.dataset.toPyDataSet(rack1)
	y = len(rack2)
	delete = []
	while x < y:
		if rack2[x]['Approved_Workcenters'] != wc:
			delete = delete + [x]
	rack3 = system.dataset.deleteRows(rack1, delete)	
	system.tag.write("[.]KanbanDisplay", rack3)

It looks like you are on version 7.9? Below is an untested script that should help.

paths = ["[default]KanbanRackCalls/WeldRacksActual","[.]../Workcenter"]
tags = system.tag.readAll(paths)
rack1 = tags[0].value
wc = tags[1].value
rowsToDelete = []
rack2 = system.dataset.toPyDataSet(rack1) 
for i,row in enumerate(rack2):
	if wc not in row["Approved_Workcenters"]:
dataOut = system.dataset.deleteRows(rack,rowsToDelete)
system.tag.write("[.]KanbanDisplay", rack3)