I have this part of code inside a plugin:
Emptylist =  def saveToList(self, layer, EmptyList): for feat in layer.selectedFeatures(): attributes = feat[self.pgLyr.currentText()] EmptyList.append(attributes)
when I run this code it stores attribute values to the list, but with additional information about the type of the field, so it returns (for example)
u'387' if the field is text typed or
L387 if the field is Long typed.
is there any way to get only 387 value, regardless of the additional information, without using a text splitting function?