Answer to Question #325862 in Python for Vasu

Question #325862

Akshya is given a list of N integers. Each number in the list appears exactly for one number. help akshya by identifying the numbers which appeared exactly once in the list.


Input

The input contains a single-line comma-separated integers.


Output

The output contains a single-line comma-separated integers.


Sample Input1

8,9,5,8,5,6


Sample Output1

9,6


Sample Input2

1,2,3,4,5,1,2,3,4

Sample Output2

5


1
Expert's answer
2022-04-08T07:57:48-0400
numbers = [int(i) for i in input().split(",")]
once = []
for i in range(len(numbers)):
	if numbers[i] not in numbers[:i] + numbers[i+1:]:
		once.append(numbers[i])
print(*once, sep=",")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS