jackfrued / jackfrued/Python-100-Days

练习中 print 的更好写法

Open
#904 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
187k
Forks
55.8k
PR merge metrics
No merged PRs in 30d

Description

可以用一些更简单的的字符串格式化方法

  • 如变量插入字符串:
       friend1 = "neko"
       friend2 = "Deta"
       print(f"My friends are {friend1} and {friend2}")
    
  • 还有另一种简单的方法
       friend = "neko"
       print("My friend is", friend) 
       # 上面两个字符串之间会插入一个空格
    

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named; first locate the exercise that teaches print formatting and review its current examples. Add the simpler f-string and comma-separated print approaches shown in the issue, then confirm the exercise clearly presents both alternatives.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
content, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.