Skip to content

Commit 76c5a58

Browse files
and_gate is Optimized
1 parent 5a66a76 commit 76c5a58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

boolean_algebra/and_gate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def and_gate(input_1: int, input_2: int) -> int:
2929
>>> and_gate(1, 1)
3030
1
3131
"""
32-
return int((input_1, input_2).count(0) == 0)
32+
return int(input_1 and input_2)
3333

3434

3535
if __name__ == "__main__":

0 commit comments

Comments
 (0)