猿问

请问这道题返回值为什么是none???

class Solution:    
    def intersect(self, nums1, nums2):        
        if len(nums1) < len(nums2):            
            self.so(nums1,nums2)        
        else:            
            self.so(nums2,nums1)        
    
    def so(self,nums1,nums2):        
        list1 = []        
        for i in range(len(nums1)):            
            if nums1[i] in nums2:                
                list1.append(nums1[i])                
                nums2.remove(nums1[i])        
        return list1
    def main():	
        xx = Solution()	
        b = xx.intersect([1,2,2,1],[2,2])	
        print(type(b))	
        print(b)	
if __name__ == '__main__':	
    main()


Zr_0118
浏览 889回答 0
0回答

慕斯4360584

LHVIVCPWXXEAGQDOHKXOOCTGSPMZJTPDZIOBROUTJNUATPCUXXJZMJGFBKFSVLNARHUWQEBVUBOHRWILBEBVVIVIMIBBKQJXERRATMTUKREOVZIBLOKQUPQANVOYVXYFSIJWDGPMGAWEFNAHBJGWNXKRIPKMGKBBYBXOBXDDAAHYDNEBMWGKOOFSSJMMZEBHSFAHRYGJMQKLHEFVZCYIMXHNQLYSPUYBTKCFZGNFNAXFSYCSMDFBKOAQKHOYLUGQOSCZWIJGPOBOPMSFWESGFJYZPJHBBEOXLISWZCTWJSXXGLLYPGANTPZGAXUXIAUYBVCMLSFPZDFLLYZTWJQQUOOXEVECVZQNZLFYZUHNWWAVKKIFMQMDXAYEOBCDYFGQTAPFSMDHDEVEGCFJJLBSSZMHDDQKRNKJKXOTBPJGCARYBZKTDUEOBFJDRUUZTROVBSFEUEHLMDQXKXVUXNUVCSFCYHGDQXTXXNAHOQTTMZYXLVPBXFOPCYIDNDXSFPOXXDKHXFZBRBFVESTZXZGPMGEDKRHUGGKVCCFZJWDZPEEOFCKBEWCLPPGTPKKRPVFLVMIVLFSADNYFGMPJADHMXRIVSPGGAGNHHIPVPGRILWWMMMCFCZPBHKGXKBROLRKGSSYOKRNXDYUHRPYYYLPVLORNKTGXURUHBBXUHXNHUUTPVIJGMTJKHLXUHCTZDUARMFCGANDICTJ

慕慕5436299

PSIOLIHCMPVYIVPWVSSSJJRKXUYIKKUYY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