Skip to content

Commit 2fff4fa

Browse files
Merge pull request #4 from sudhabengani/patch-2
Create tuple.py
2 parents 85687a3 + 65ab092 commit 2fff4fa

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

tuple.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Different types of tuples
2+
3+
# Empty tuple
4+
my_tuple = ()
5+
print(my_tuple)
6+
7+
# Tuple having integers
8+
my_tuple = (1, 2, 3)
9+
print(my_tuple)
10+
11+
# tuple with mixed datatypes
12+
my_tuple = (1, "Hello", 3.4)
13+
print(my_tuple)
14+
15+
# nested tuple
16+
my_tuple = ("mouse", [8, 4, 6], (1, 2, 3))
17+
print(my_tuple)

0 commit comments

Comments
 (0)