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

23
Acara-12/tuple.py Executable file
View File

@@ -0,0 +1,23 @@
tupleKosong = ()
tupleSingleton = ('satu',)
tupleSingleton2 = (1,)
tupleSingleton3 = 'satu',
tupleBulan = ('Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni')
#dibuat tanpa kurung
tupleAngka = 1,2,3,4,5,6,7,8,9,10
print (tupleKosong)
print (tupleSingleton)
print (tupleSingleton2)
print (tupleSingleton3)
print (tupleBulan)
print (tupleAngka)
print ('\n')
#cek tipe data
print (type(tupleSingleton))
print (type(tupleSingleton2))
print (type(tupleSingleton3))
print (type(tupleAngka))