Skip to content

Commit 81e2fc0

Browse files
committed
Don't use input keyword as variable name
Rename it to input_set.
1 parent fabea4b commit 81e2fc0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

set_-_data_structure.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ You can intersect two sets. For instance:
4040
.. code:: python
4141
4242
valid = set(['yellow', 'red', 'blue', 'green', 'black'])
43-
input = set(['red', 'brown'])
44-
print(input.intersection(valid))
43+
input_set = set(['red', 'brown'])
44+
print(input_set.intersection(valid))
4545
# Output: set(['red'])
4646
4747
**Difference**
@@ -52,8 +52,8 @@ difference method. For example:
5252
.. code:: python
5353
5454
valid = set(['yellow', 'red', 'blue', 'green', 'black'])
55-
input = set(['red', 'brown'])
56-
print(input.difference(valid))
55+
input_set = set(['red', 'brown'])
56+
print(input_set.difference(valid))
5757
# Output: set(['brown'])
5858
5959
You can also create sets using the new notation:

0 commit comments

Comments
 (0)