How to find a character in a cell?

Can someone give me a clue how to find a character in a cell from a powertable.
Thanks

I have tried this but it doesn’t work.

**string=self.data.getValueAt(rowIndex,'ALIMNAME1')**

	if 'G' in string:
		if colName == 'T2T' or colName == 'T2TH' or colName == 'T2_DIA' :
			if float(self.data.getValueAt(rowIndex,'T2_DIA')) < float(self.data.getValueAt(rowIndex,'T2TH')):
				return {'background': '168,0,0'}

Use hex values for your color. Also, I recommend defining a default set of colors at the beginning. It will make it more flexible if you add functionality:

	config = {'background': 'white', 'foreground':'black'}

	string = self.data.getValueAt(rowIndex,'ALIMNAME1')
	
	if 'G' in string:
		if colName == 'T2T' or colName == 'T2TH' or colName == 'T2_DIA' :
			if float(self.data.getValueAt(rowIndex,'T2_DIA')) < float(self.data.getValueAt(rowIndex,'T2TH')):
				config['background'] = '#A80000'}
				config['foreground'] = 'white'
		
	return config

Thanks for you answer.