Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I have solved the program with the following modification. But comparatively this takes a lot of time for larger $n$ as the same loop runs twice. Can we do it by running the loop only once?

def xyz(n): m=max([a.det() for a in myfunction(n)]) for A in myfunction(n): if A.det()==m: print A

I have solved the program problem with the following modification. But comparatively this takes a lot of time for larger $n$ as the same loop runs twice. Can we do it by running the loop only once?

def xyz(n): m=max([a.det() for a in myfunction(n)]) for A in myfunction(n): if A.det()==m: print A

I have solved the problem with the following modification. But comparatively this takes a lot of time for larger $n$ as the same loop runs twice. Can we do it by running the loop only once?

def xyz(n):
    m=max([a.det() for a in myfunction(n)])
    for A in myfunction(n):
        if A.det()==m:
            print A

A