• 2022-06-04
    对一个列表里的数据进行奇偶数分离 numbers = [12, 37, 5, 42, 8, 3] even = [] odd = [] while len(numbers) > 0 : number = ( ) if(number % 2 == 0): even.append(number) else: odd.append(number) print even print odd