Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson5_5
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
8384c7a7
authored
Feb 25, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
52bcf61d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
0 deletions
1.py
2.py
4.py
babadabisai.py
1.py
0 → 100644
View file @
8384c7a7
bro1
=
"刘备"
bro2
=
"关羽"
bro3
=
"张飞"
bros
=
[
"刘备"
,
"关羽"
,
"张飞"
]
bro1
=
[
"刘备"
,
161
,
9.1
]
bro2
=
[
"关羽"
,
160
,
8.5
]
bro3
=
[
"张飞"
,
166
,
8.3
]
bros
[
0
]
=
"关羽"
bros
[
1
]
=
"刘备"
print
(
bros
)
a
=
[
'华雄'
]
b
=
[
'袁术'
,
'夏侯惇'
,
'曹操'
,
'关羽'
]
b
.
remove
(
'关羽'
)
print
(
b
)
a
.
insert
(
1
,
'关羽'
)
print
(
a
)
c
=
[
'颜良'
,
'文丑'
]
a
.
extend
(
c
)
print
(
a
)
a
=
[
"吕布"
]
2.py
0 → 100644
View file @
8384c7a7
list
=
[
'苹果'
,
'香蕉'
,
'西瓜'
,
'香蕉'
,
'桃子'
,
'香蕉'
]
list
.
remove
(
'西瓜'
)
list
.
pop
(
-
1
)
print
(
list
)
4.py
0 → 100644
View file @
8384c7a7
b
=
[
'袁术'
,
'公孙瓒'
,
'刘备'
,
'关羽'
,
'张飞'
,
'曹操'
]
a
=
[
'吕布'
]
a
.
extend
(
b
[
2
:
5
])
print
(
a
)
babadabisai.py
0 → 100644
View file @
8384c7a7
name
=
'刘强'
power
=
66
hero
=
[
'赵一'
,
30
,
'丁二'
,
37
,
'孙五'
,
52
,
'王猛'
,
89
,
'周亮'
,
98
]
for
i
in
range
(
len
(
hero
)):
if
i
%
2
==
1
and
hero
[
i
]
>=
power
:
hero
.
insert
(
i
-
1
,
name
)
hero
.
insert
(
i
,(
power
))
break
print
(
hero
)
print
(
hero
[
-
6
:])
\ 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