Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson13-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
fb9ec54f
authored
Nov 02, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
5ec53ebb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
diy.py
k.py
diy.py
View file @
fb9ec54f
with
open
(
r'c:\Users\Administrator\Documents\lesson13-1\sales_list.txt'
,
'r'
,
encoding
=
'utf-8'
)
as
file
:
a
=
file
.
readlines
()
# 一次性读取多行,返回的结果是一个列表
#print(a)
for
i
in
a
:
b
=
i
.
split
()
print
(
b
[
1
:])
\ No newline at end of file
k.py
0 → 100644
View file @
fb9ec54f
想被分开的字符
str
.
split
()
括号里填分隔符号,默认为空格
\ 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