0
Why the result doesn't give {8,9,7}, Set always give the values in their own order...
https://sololearn.com/compiler-playground/c03kCSDRtRdr/?ref=app
2 ответов
+ 2
"""
Theo Martier ,
The official docs on set:
https://docs.python.org/3/library/stdtypes.html#set-types-set-frozenset
You can also do it this way.
"""
first = {1, 2, 3, 4, 5, 6}
second = {4, 5, 6, 7, 8, 9}
print(sorted(list(second - first))) # [7, 8, 9]
+ 1
Thank you , NB and Rain 👍