jackfrued / jackfrued/Python-100-Days
Day01-15 02语言元素 指正一个错误
Open
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 187k
- Forks
- 55.8k
- PR merge metrics
- No merged PRs in 30d
Description
赋值操作不是一个运算符,而是一个语句,赋值语句。
判断一个操作是语句还是运算符,最简单的是看有没有返回值,一个运算一定是要返回一个值的(在python里就是对象),而语句则不会。
a = 10
b = a<20 # b的值是True,a<20返回True对象
if b = a<20: # 这条语句是错误的,因为b=a<20是语句,没有返回值,if就判断不了
print('yes')
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
Review the Day01-15 “02语言元素” lesson and the assignment/operator explanation shown in the issue. Verify the wording and Python example against the lesson’s surrounding content; done when the reported conceptual error is corrected and the example is consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100