Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson6-1
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
84d8fe59
authored
Feb 23, 2025
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
14feb2d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
diy.py
diy.py
View file @
84d8fe59
...
...
@@ -10,4 +10,20 @@ bro2=["刘备",161,9.1]
bro3
=
[
"张飞"
,
166
,
8.3
]
bros
[
0
]
=
"关羽"
bros
[
1
]
=
"刘备"
print
(
bros
)
\ No newline at end of file
print
(
bros
)
'''
# 列表中删除元素的方法:
1. 列表名.pop() 用来删除指定位置的元素,括号里填要删除元素的索引值
2. remove() 用来删除某一个元素,括号里填要删除的那个元素
#列表中增加元素的方法:
1. 列表名.insert(索引,内容) 在指定位置插入元素
2. 列表名.append(内容) 在列表末尾增加元素,只能增加一个
3. 列表名.extend(列表) 在列表末尾追加多个元素
'''
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment