def even_odd(numbers): even = [] odd = [] for num in numbers: if num % 2 == 0: even.append(num) else: odd.append(num) return even, odd # مثال استفاده از تابع: numbers = input("لطفا اعداد را با استفاده از کاما جدا کنید: ").split(",") numbers = [int(num) for num in numbers] even, odd = even_odd(numbers) print("اعداد زوج:", even) print("اعداد فرد:", odd)