Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit712e32f

Browse files
authored
Merge pull requestwilfredinni#51 from qudongfang/minor_improvements
A few minor improvements about formatting and spelling
2 parents7331026 +6add556 commit712e32f

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

‎README.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ String Replication:
322322

323323
###Variables
324324

325-
You can name a variable anything as long as it obeys the followingthreerules:
325+
You can name a variable anything as long as it obeys the following rules:
326326

327327
1. It can be only one word.
328328
1. It can use only letters, numbers, and the underscore (`_`) character.
@@ -783,7 +783,7 @@ import random, sys, os, math
783783
```
784784

785785
```python
786-
from randomimport*.
786+
from randomimport*
787787
```
788788

789789
[*Return to the Top*](#python-cheatsheet)
@@ -2267,7 +2267,7 @@ Example:
22672267
```python
22682268
>>> b= {"abc","def"}
22692269
>>> {s.upper()for sin b}
2270-
{"ABC","DEF}
2270+
{"ABC","DEF"}
22712271
```
22722272

22732273
###Dict comprehension
@@ -3010,7 +3010,7 @@ To summarize what the findall() method returns, remember the following:
30103010

30113011
- When called on a regex with no groups, such as \d-\d\d\d-\d\d\d\d, the method findall() returns a list of ng matches, such as['415-555-9999', '212-555-0000'].
30123012

3013-
- When called on a regex that has groups, suchas (\d\d\d)-d\d)-(\d\d\d\d), the method findall() returns a list of es of strings (one string for each group), such as [('415', ', '9999'), ('212', '555', '0000')].
3013+
- When called on a regex that has groups, such as (\d\d\d)-(d\d)-(\d\d\d\d), the method findall() returns a list of es of strings (one string for each group), such as[('415','555', '9999'), ('212', '555', '0000')].
30143014

30153015
[*Return to the Top*](#python-cheatsheet)
30163016

@@ -3249,9 +3249,9 @@ to handle file system paths.
32493249

32503250
### Backslash on Windows and Forward Slash on OS X and Linux
32513251

3252-
On Windows, paths are written using backslashes (\) as the separator between
3252+
On Windows, paths are written using backslashes (`\`) as the separator between
32533253
folder names. On Unix based operating system suchas macOS, Linux,and BSDs,
3254-
the forward slash (/)is usedas the path separator. Joining paths can be
3254+
the forward slash (`/`)is usedas the path separator. Joining paths can be
32553255
a headacheif your code needs to work on different platforms.
32563256

32573257
Fortunately, Python provides easy ways to handle this. We will showcase

‎markdown/01_Python_Basics.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ String Replication:
8787

8888
###Variables
8989

90-
You can name a variable anything as long as it obeys the followingthreerules:
90+
You can name a variable anything as long as it obeys the following rules:
9191

9292
1. It can be only one word.
9393
2. It can use only letters, numbers, and the underscore (`_`) character.

‎markdown/02_Flow_Control.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ import random, sys, os, math
283283
```
284284

285285
```python
286-
from randomimport*.
286+
from randomimport*
287287
```
288288

289289
###Ending a Program with sys.exit

‎markdown/12_Regular_Expressions.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ To summarize what the findall() method returns, remember the following:
193193

194194
- When called on a regex with no groups, such as \d-\d\d\d-\d\d\d\d, the method findall() returns a list of ng matches, such as['415-555-9999', '212-555-0000'].
195195

196-
- When called on a regex that has groups, such as (\d\d\d)-d\d)-(\d\d\d\d), the method findall() returns a list of es of strings (one string for each group), such as[('415', ', '9999'), ('212', '555', '0000')].
196+
- When called on a regex that has groups, such as (\d\d\d)-(d\d)-(\d\d\d\d), the method findall() returns a list of es of strings (one string for each group), such as[('415','555', '9999'), ('212', '555', '0000')].
197197

198198
###Making Your Own Character Classes
199199

‎markdown/13_File_and_Directory_Paths.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ to handle file system paths.
1818

1919
###Backslash on Windows and Forward Slash on OS X and Linux
2020

21-
On Windows, paths are written using backslashes (\) as the separator between
21+
On Windows, paths are written using backslashes (`\`) as the separator between
2222
folder names. On Unix based operating system such as macOS, Linux, and BSDs,
23-
the forward slash (/) is used as the path separator. Joining paths can be
23+
the forward slash (`/`) is used as the path separator. Joining paths can be
2424
a headache if your code needs to work on different platforms.
2525

2626
Fortunately, Python provides easy ways to handle this. We will showcase

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp