selfteaching / selfteaching/selfteaching-python-camp
Day05 数据类型转换,列表转字符串
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 151
- Forks
- 875
- PR merge metrics
- No merged PRs in 30d
Description
arr = [0,1,2,3,4,5,6,7,8,9]
str = ''.join(str(i) for i in arr)
print(str)
请教,想把数字数组arr转变成字符串,没有看懂str = ''.join(str(i) for i in arr)这个语句,这个是固定语句吗?是否可以分解成更加简单便于理解的语句?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Day05 data-type-conversion lesson and the join expression shown in the issue. Clarify whether the statement is fixed syntax by breaking it into the referenced conversion and joining steps; done means a beginner can understand the expression and reproduce the list-to-string result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100