Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson6-3
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
b6ec3bf4
authored
Feb 26, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
c593e827
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletions
quiz1.py
quiz1.py
View file @
b6ec3bf4
# 勇于挑战的创造师,请运行这段代码,看看能不能将颜良、文丑加入战场?
a
=
[
'华雄'
]
a
.
append
(
'颜良'
,
'文丑'
)
# append(参数) 括号内只能添加一个参数
# a.append('颜良','文丑')
#方法一
#a.append('颜良')
#a.append('文丑')
# 方法2
b
=
[
'颜良2'
,
'文丑2'
]
a
.
extend
(
b
)
# 方法3
a
.
insert
(
1
,
'颜良1'
)
a
.
insert
(
2
,
'文丑1'
)
print
(
a
)
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