Skip to content

Commit 26b1453

Browse files
Add files via upload
1 parent beaf7da commit 26b1453

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

python_study_2/page3/script.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
fruits = ['apple', 'banana', 'orange']
2+
3+
# Add 'grape' to 'fruits'
4+
fruits.append("grape")
5+
6+
# Print 'fruits'
7+
8+
print(fruits)
9+
# Update the element at index 0
10+
fruits[0] = "cherry"
11+
12+
# Print the element at index 0
13+
print(fruits[0])
14+

0 commit comments

Comments
 (0)