Skip to content

Commit 9d43ce0

Browse files
committed
Adding Python Array
1 parent e5080cb commit 9d43ce0

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Python/Array/Main.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
variable_list = [1, "Billy", 1.5, True]
2+
3+
for item in variable_list:
4+
print(f"Item: {item}, Type: {type(item)}")
5+
6+
variable_list.append("Fenny")
7+
8+
for index, item in enumerate(variable_list):
9+
print(f"Index: {index}, Item: {item}")
10+
11+
variable_list.remove(1.5)
12+
13+
for index, item in enumerate(variable_list):
14+
print(f"Index: {index}, Item: {item}")
15+
16+
variable_list.insert(2, "Sendy")
17+
18+
for index, item in enumerate(variable_list):
19+
print(f"Index: {index}, Item: {item}")

0 commit comments

Comments
 (0)