This commit is contained in:
Chizuui
2025-11-27 00:38:38 +07:00
parent 5444efab13
commit 1795fa1c2f
81 changed files with 1893 additions and 0 deletions

10
Acara-13/difference.py Normal file
View File

@@ -0,0 +1,10 @@
a = {1,2,3,4,5}
b = {4,5,6,7,8}
# mencari selisih antara set a dan b menggunakan operator -
print (a - b)
# menggunakan fungsi difference()
print (a.difference(b))
# Menggunakan fungsi difference()
print (b.difference(a))