gIn = list()
egIn = [101, 'Python', 102, 'Machine Learning', 'Deep Learning', 1]
def function1 (lst1):
lst1.sort(key=lambda e: (isinstance(e, str), e))
return lst1
print(function1(egIn))
Why are we using (isinstance(e, str), e)
in this function? i understood isinstance(e,str)
but why is that other e
? what does it do and how the key
parameter is used