# Revision history [back]

### all final(optimal) values of for loop

I have written a program to check which matrices in a given class maximizes the determinant. But my program gives me only one such matrix, I need all those matrices which attains the maximum determinant.

def xyz(n): m=0 A=matrix(QQ,n) for a in myfunction(n): if a.det()>m: m=a.det() A=a print A 2 None John Palmieri 7648 ●18 ●66 ●166 http://www.math.washin...

### all final(optimal) values of for loop

I have written a program to check which matrices in a given class maximizes the determinant. But my program gives me only one such matrix, I need all those matrices which attains the maximum determinant.

 def xyz(n):
m=0
A=matrix(QQ,n)
for a in myfunction(n):
if a.det()>m:
m=a.det()
A=a
print  AA
{"ft_lang_label":"__label__en","ft_lang_prob":0.74932706,"math_prob":0.9206232,"size":294,"snap":"2022-40-2023-06","text_gpt3_token_len":75,"char_repetition_ratio":0.113793105,"word_repetition_ratio":0.0,"special_character_ratio":0.24829932,"punctuation_ratio":0.13043478,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9984816,"pos_list":[0,1,2,3,4,5,6],"im_url_duplicate_count":[null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-02-01T15:05:12Z\",\"WARC-Record-ID\":\"<urn:uuid:6838d895-5aa2-4772-8bd3-f4a0de5d1408>\",\"Content-Length\":\"17832\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:c46e4000-9607-4f90-807f-dfee2fc0ca1c>\",\"WARC-Concurrent-To\":\"<urn:uuid:56603cb0-9e9d-4e59-9c36-4f86d14ccae0>\",\"WARC-IP-Address\":\"194.254.163.53\",\"WARC-Target-URI\":\"https://ask.sagemath.org/questions/36860/revisions/\",\"WARC-Payload-Digest\":\"sha1:7OPA452UC3KRQHIBEKDT7Z3GNSF7JGQA\",\"WARC-Block-Digest\":\"sha1:GI3UISDHB4HQ4CJ7KFTJGWTFOFZC4DIU\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-06/CC-MAIN-2023-06_segments_1674764499946.80_warc_CC-MAIN-20230201144459-20230201174459-00313.warc.gz\"}"}