+ 1

How to print unique number .?

example i enter the five number 1 2 2 3 5 the only will display is the number with no duplicate [1,3,5]

22nd Oct 2018, 12:20 PM
Goodboy08
Goodboy08 - avatar
1 Answer
+ 2
Edit: Oh sorry i see that i interpretate the problem wrong. Just wait a minute i will provide another answer Edit1: OK. new code here https://code.sololearn.com/cF8cQ3SbzRVh Still use sets data structure to resolve the problem. So use the structure called set. Set is and i quote "A set is an unordered collection with no duplicate elements". -- Python Documentation. Here a example: https://code.sololearn.com/c6A5P4zBP86D Check 5.4 topic for better reference in this link (Python documentation): https://docs.python.org/3/tutorial/datastructures.html
22nd Oct 2018, 1:02 PM
Anya
Anya - avatar