Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
1
1_homework_安晓东
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
安晓东
1_homework_安晓东
Commits
f3127e80
Commit
f3127e80
authored
Jan 14, 2019
by
安晓东
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update homework_01.py
parent
52e9e587
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
lession_4/homework_01.py
+21
-0
No files found.
lession_4/homework_01.py
View file @
f3127e80
...
@@ -18,3 +18,23 @@ def convert(s, numRows):
...
@@ -18,3 +18,23 @@ def convert(s, numRows):
s
=
convert
(
"PAYPALISHIRING"
,
4
)
s
=
convert
(
"PAYPALISHIRING"
,
4
)
print
(
s
)
print
(
s
)
# def convert(s, numRows):
# if numRows == 1:
# return s
# l = [''] * numRows
# print(l)
# row,step = 0,1
# for c in s:
# if row == 0:
# step = 1
# if row == numRows - 1:
# step = -1
# l[row] += c
# row += step
# return ''.join(l)
# print(convert('LEETCODEISHIRING', 3) ) # 预期输出 'LCIRETOESIIGEDHN'
\ 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