File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,10 @@ and prints it. Maybe a custom function could also take an argument?
199
199
>> >
200
200
```
201
201
202
+ Here ` message ` is an argument. When we call the function we'll get a
203
+ local variable called message that will point to whatever we passed
204
+ to ` print_twice ` .
205
+
202
206
This function can be called in two ways:
203
207
204
208
- Using a ** positional argument** .
@@ -213,6 +217,9 @@ This function can be called in two ways:
213
217
>> >
214
218
```
215
219
220
+ When the function was running it had a local `message` variable
221
+ that pointed to `" hi" ` . The function printed it twice.
222
+
216
223
Positional arguments are great for simple things, but if your
217
224
function takes many positional arguments it may be hard to tell
218
225
which argument is which.
You can’t perform that action at this time.
0 commit comments