
# membuat tuple kosong

 # Output: ()

tuplel = ()

print(tuplel)



 # tuple dengan 1 elemen

# Output: (1,)

tuplel = (1,)

print (tuplel)

# tuple berisi integer

# output = (1, 2, 3)

tuplel = (1, 2, 3)

print(tuplel)

  # tuple bersarang

  # Output: (“hello”, [1, 2, 31, (4, 5, 6))
tuplel = ("hello", [1, 2, 3], (4, 5, 6))
print(tuplel)



# Tuple bisa tidak menggunakan tanda ()
# Output (1, 2, 3)

tuplel = 1, 2, 3
print(tuplel)

 # memasukkan anggota tuple ke variabel yang bersesuaian
 # a akan berisi 1, b berisi 2, dan c berisi 3
 # output 1 2 3

a, b, c = tuplel

print(a, b, c)
