selfteaching / selfteaching/selfteaching-python-camp

Day02 写这两行代码的区别

Open
#113 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

在Mac上,第一次输入print'hello world.',
得到的结果是
File "", line 1
print'hello world.'
^
SyntaxError: invalid syntax
第二次根据 @Jinjin1111 的帖子输入print('hello_world')
得到了想要的结果
hello_world

想知道这个细节上的区别!

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

Start by reading the two Python examples in the issue and running them in the same interpreter to compare their behavior. Done means documenting the syntax difference and explaining why the two forms produce different results; no project files or tests are named.

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.