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

Commitca6a22d

Browse files
committed
Fixed indentation
1 parent1141c37 commitca6a22d

File tree

4 files changed

+26
-26
lines changed

4 files changed

+26
-26
lines changed

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3995,8 +3995,8 @@ def box_print(symbol, width, height):
39953995
for sym, w, hin (('*',4,4), ('O',20,5), ('x',1,3), ('ZZ',3,3)):
39963996
try:
39973997
box_print(sym, w, h)
3998-
exceptExceptionas err:
3999-
print('An exception happened:'+str(err))
3998+
exceptExceptionas err:
3999+
print('An exception happened:'+str(err))
40004000
```
40014001

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

‎blog_files/pysheet.md‎

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -322,19 +322,19 @@ The *and* Operator’s *Truth* Table:
322322

323323
The*or* Operator’s*Truth* Table:
324324

325-
| Expression| Evaluates to|
326-
| --------------| --------------|
327-
| True or True| True|
328-
| True or False| True|
329-
| False or True| True|
330-
| False or False| False|
325+
| Expression| Evaluates to|
326+
| --------------| ------------|
327+
| True or True| True|
328+
| True or False| True|
329+
| False or True| True|
330+
| False or False| False|
331331

332332
The*not* Operator’s*Truth* Table:
333333

334-
| Expression| Evaluates to|
335-
| -----------|-------------|
336-
| not True| False|
337-
| not False| True|
334+
| Expression| Evaluates to|
335+
| ----------| ------------|
336+
| not True| False|
337+
| not False| True|
338338

339339
###Mixing Boolean and Comparison Operators
340340

@@ -1900,13 +1900,13 @@ A List comprehension can be generated from a dictionary:
19001900

19011901
### Escape Characters
19021902

1903-
| Escape character| Printsas|
1904-
|------------------|--------------------|
1905-
|`\'`| Single quote |
1906-
| `\"`| Double quote |
1907-
|`\t`| Tab |
1908-
| `\n`| Newline (line break) |
1909-
|`\\`| Backslash |
1903+
| Escape character| Printsas|
1904+
|----------------|--------------------|
1905+
|`\'` | Single quote |
1906+
| `\"` | Double quote |
1907+
|`\t` | Tab |
1908+
| `\n` | Newline (line break) |
1909+
|`\\` | Backslash |
19101910
19111911
Example:
19121912

@@ -2702,10 +2702,10 @@ The dot-star will match everything except a newline. By passing re.DOTALL as the
27022702
|`^spam`| means the string must beginwith spam.|
27032703
|`spam$`| means the string must endwith spam.|
27042704
|`.`|any character,except newline characters.|
2705-
|`\d`, `\w`, and `\s` | a digit, word, or space character, resectively.|
2705+
|`\d`, `\w`, and `\s` | a digit, word, or space character, resectively. |
27062706
| `\D`, `\W`, and `\S` | anything except a digit, word, or space acter, respectively. |
27072707
|`[abc]`|any character between the brackets (suchas a, b, ).|
2708-
|`[^abc]`|any character that isn’t between the brackets.|
2708+
|`[^abc]`|any character that isn’t between the brackets.|
27092709

27102710
### Case-Insensitive Matching
27112711

@@ -3518,8 +3518,8 @@ def box_print(symbol, width, height):
35183518
for sym, w, hin (('*',4,4), ('O',20,5), ('x',1,3), ('ZZ',3,3)):
35193519
try:
35203520
box_print(sym, w, h)
3521-
exceptExceptionas err:
3522-
print('An exception happened:'+str(err))
3521+
exceptExceptionas err:
3522+
print('An exception happened:'+str(err))
35233523
```
35243524

35253525
### Getting the Traceback as a String
@@ -3630,7 +3630,7 @@ Logging levels provide a way to categorize your log messages by importance. Ther
36303630
|----------|--------------------|------------------------------------------------------------------------------------------------------------------------------|
36313631
|`DEBUG`|`logging.debug()`| The lowest level. Usedfor small details. Usually you care about these messages only when diagnosing problems.|
36323632
|`INFO`|`logging.info()`| Used to record information on general eventsin your programor confirm that things are working at their pointin the program.|
3633-
|`WARNING`|`logging.warning()`| Used to indicate a potential problem that doesn’t prevent the programfrom working but might do soin the future.|
3633+
|`WARNING`|`logging.warning()`| Used to indicate a potential problem that doesn’t prevent the programfrom working but might do soin the future.|
36343634
|`ERROR`|`logging.error()`| Used to record an error that caused the program to fail to do something.|
36353635
|`CRITICAL`|`logging.critical()`| The highest level. Used to indicate a fatal error that has causedoris about to cause the program to stop running entirely.|
36363636

‎python_cheat_sheet.ipynb‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6881,8 +6881,8 @@
68816881
"for sym, w, h in (('*', 4, 4), ('O', 20, 5), ('x', 1, 3), ('ZZ', 3, 3)):\n",
68826882
" try:\n",
68836883
" box_print(sym, w, h)\n",
6884-
" except Exception as err:\n",
6885-
" print('An exception happened: ' + str(err))"
6884+
"except Exception as err:\n",
6885+
"print('An exception happened: ' + str(err))"
68866886
]
68876887
},
68886888
{

‎python_cheat_sheet.pdf‎

-293 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp