>>336
class my_obj:

 def sort(self,tgt):
  if type(tgt) is list:
   for i in tgt:
     〜〜〜
  elif type(tgt) is str:
      〜〜〜

こんな感じでどうっすか?