There are 2 cases in my function, 1: All arguments will be strings there is no problem with this one. 2: There will also be int or floats. What i want to do is, check the types of *vars, if there is int or float type, find the index of this types.
def fonk(comp, *vars):
    varList = []
    varList.append(vars)
    varList = [x for xs in varList for x in xs]
    for i in range(len(varList)):
       if all(isinstance(x, str) for x in varList) == False:
          if type(varList[i]) == int or float:
for example:
fonk(">","str1", 1, "str2", 2.5)
so int and float type would be vars[1] and vars[3]. How can i determine this? Thanks in advance.
 
     
    