Skip to content

Commit f61a7ed

Browse files
committed
add shell block for output section
1 parent 97d0552 commit f61a7ed

File tree

1 file changed

+30
-27
lines changed
  • content/python/concepts/built-in-functions/terms/help

1 file changed

+30
-27
lines changed

content/python/concepts/built-in-functions/terms/help/help.md

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -35,39 +35,42 @@ Below is an example where a build-in function is passed as argument:
3535

3636
```py
3737
help(print)
38-
# Output:
39-
# print(...)
40-
# print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False)
41-
#
42-
# Prints the values to a stream, or to sys.stdout by default.
43-
# Optional keyword arguments:
44-
# file: a file-like object (stream); defaults to the current sys.stdout.
45-
# sep: string inserted between values, default a space.
46-
# end: string appended after the last value, default a newline.
47-
# flush: whether to forcibly flush the stream.
48-
38+
```
39+
Which produces the following output:
40+
```shell
41+
print(...)
42+
print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False)
43+
44+
Prints the values to a stream, or to sys.stdout by default.
45+
Optional keyword arguments:
46+
file: a file-like object (stream); defaults to the current sys.stdout.
47+
sep: string inserted between values, default a space.
48+
end: string appended after the last value, default a newline.
49+
flush: whether to forcibly flush the stream.
4950
```
5051

5152
If no argument is present:
5253

5354
```py
5455
help()
55-
# Output:
56-
# Welcome to Python 3's help utility!
57-
#
58-
# If this is your first time using Python, you should definitely check out
59-
# the tutorial on the internet at https://docs.python.org/3.10/tutorial/.
60-
#
61-
# Enter the name of any module, keyword, or topic to get help on writing
62-
# Python programs and using Python modules. To quit this help utility and
63-
# return to the interpreter, just type "quit".
64-
#
65-
# To get a list of available modules, keywords, symbols, or topics, type
66-
# "modules", "keywords", "symbols", or "topics". Each module also comes
67-
# with a one-line summary of what it does; to list the modules whose name
68-
# or summary contain a given string such as "spam", type "modules spam".
69-
#
70-
# help>
56+
```
57+
Which returns:
58+
```shell
59+
Welcome to Python 3's help utility!
60+
61+
If this is your first time using Python, you should definitely check out
62+
the tutorial on the internet at https://docs.python.org/3.10/tutorial/.
63+
64+
Enter the name of any module, keyword, or topic to get help on writing
65+
Python programs and using Python modules. To quit this help utility and
66+
return to the interpreter, just type "quit".
67+
68+
To get a list of available modules, keywords, symbols, or topics, type
69+
"modules", "keywords", "symbols", or "topics". Each module also comes
70+
with a one-line summary of what it does; to list the modules whose name
71+
or summary contain a given string such as "spam", type "modules spam".
72+
73+
help>
7174
```
7275
7376
## Codebyte Example

0 commit comments

Comments
 (0)