+ 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]
1 Odpowiedź
+ 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