selfteaching / selfteaching/selfteaching-python-camp

Day06 re.sub()方法不理解

Open
#3,436 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
151
Forks
875
PR merge metrics
No merged PRs in 30d

Description

# 2.将字符串中的英文以及数字替换为空,即删除
d = re.sub("[A-Za-z0-9]", "", d)

A-Za-z0-9,中间不用空格或其它符号隔开的吗?

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. Start with the shown re.sub call and Python's regular-expression character-class documentation; clarify the syntax question in the lesson context. Done means adding an explanation that answers whether the characters inside A-Za-z0-9 need separators.

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
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.