-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path3.py
More file actions
31 lines (26 loc) · 652 Bytes
/
3.py
File metadata and controls
31 lines (26 loc) · 652 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# -*- coding: utf-8 -*-
"""3.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1hbi1u8wgdZPMFCJGIEOIqbYh4fn01BdB
"""
number_list = input("Enter number with comma: ")
#print(type(number_list))
li=list(number_list.split(","))
list_num=list(map(int, li))
#print(type(list_num))
#print(list_num)
count1=0
count2=0
remove=[]
for i in list_num:
if i%2==0:
remove.append(i)
count1=count1+1
else:
count2=count2+1
print("Even Number count:", count1)
print("ODD Number count:" ,count2)
#print(remove)
list_num=list(set(list_num)-set(remove))
print("Updated list",list_num)