I have a list which I am trying to call a function on each of this list's elements (which is also a list) given a certain condition is fulfilled (the element length has to be greater than 1):
videos = [self.__process_video(e) if len(e) > 1 else '' for e in videos]
However, I am getting an error
TypeError: object of type 'generator' has no len()