First
This commit is contained in:
23
Acara-12/tuple.py
Executable file
23
Acara-12/tuple.py
Executable 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))
|
||||
Reference in New Issue
Block a user