Last active
May 8, 2019 21:12
-
-
Save Sukhrobjon/37a5bebac4c4c92ac8f619c56a72bb46 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # list of number | |
| number_arr = [1, 2, 3, 3, 4, 2] | |
| print(number_arr) # [1, 2, 3, 3, 4, 2] | |
| # we can wrap the same list of numbers in a set | |
| number_set = set([1, 2, 3, 3, 4, 2]) | |
| # if we print it returns only distinct numbers | |
| print(number_set) # {1, 2, 3, 4} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment