python Compressing function within for loop : I am taking `l=['1','2','3','rt4','rt5']` as input and I am converting it into `l=[1,2,3,'rt4','rt5']` by following code:-  

    def RepresentsInt(s):
        try: 
            int(s)
            return True
        except ValueError:
            return False
    l=['1','2','3','rt4','rt5']
    l=[int(l[i]) if RepresentsInt(l[i]) else l[i] for i in range(0,len(l))]  
I want to compress above code using python compression. I want to make code containing only ***two line***. *First line assign value to list* and *second line changing the list using my above mentioned code*. Can any one tell how to compress above code using python compression ?  
Thanks in advance.
 
