Multiple 'In' operator in python
arr = [1, True, 'a', 2]
print('a' in arr in arr) # False
Can you explain me why this code will output 'False'?
The question is closed.
Answer from @KlausD.: Actually it is a comparison operator chaining and will be interpreted as ('a' in arr) and (arr in arr)
.
python python-3.x operators in-operator
|
show 1 more comment
arr = [1, True, 'a', 2]
print('a' in arr in arr) # False
Can you explain me why this code will output 'False'?
The question is closed.
Answer from @KlausD.: Actually it is a comparison operator chaining and will be interpreted as ('a' in arr) and (arr in arr)
.
python python-3.x operators in-operator
Just do'a' in arr
– W-B
Nov 11 at 7:05
I believe you're expectingTrue
because, you see'a' in arr in arr
asTrue in arr
?
– Austin
Nov 11 at 7:08
@Austin, just run this code. It output False.
– Matvey
Nov 11 at 7:23
Please explain waht your expected result was, and why. The question as it is, is unclear
– CIsForCookies
Nov 11 at 7:27
@CIsForCookies, What did you not understand? I wanna understand why the expression " 'a' in arr in arr " is False
– Matvey
Nov 11 at 7:32
|
show 1 more comment
arr = [1, True, 'a', 2]
print('a' in arr in arr) # False
Can you explain me why this code will output 'False'?
The question is closed.
Answer from @KlausD.: Actually it is a comparison operator chaining and will be interpreted as ('a' in arr) and (arr in arr)
.
python python-3.x operators in-operator
arr = [1, True, 'a', 2]
print('a' in arr in arr) # False
Can you explain me why this code will output 'False'?
The question is closed.
Answer from @KlausD.: Actually it is a comparison operator chaining and will be interpreted as ('a' in arr) and (arr in arr)
.
python python-3.x operators in-operator
python python-3.x operators in-operator
edited Nov 11 at 8:26
asked Nov 11 at 7:04
Matvey
13
13
Just do'a' in arr
– W-B
Nov 11 at 7:05
I believe you're expectingTrue
because, you see'a' in arr in arr
asTrue in arr
?
– Austin
Nov 11 at 7:08
@Austin, just run this code. It output False.
– Matvey
Nov 11 at 7:23
Please explain waht your expected result was, and why. The question as it is, is unclear
– CIsForCookies
Nov 11 at 7:27
@CIsForCookies, What did you not understand? I wanna understand why the expression " 'a' in arr in arr " is False
– Matvey
Nov 11 at 7:32
|
show 1 more comment
Just do'a' in arr
– W-B
Nov 11 at 7:05
I believe you're expectingTrue
because, you see'a' in arr in arr
asTrue in arr
?
– Austin
Nov 11 at 7:08
@Austin, just run this code. It output False.
– Matvey
Nov 11 at 7:23
Please explain waht your expected result was, and why. The question as it is, is unclear
– CIsForCookies
Nov 11 at 7:27
@CIsForCookies, What did you not understand? I wanna understand why the expression " 'a' in arr in arr " is False
– Matvey
Nov 11 at 7:32
Just do
'a' in arr
– W-B
Nov 11 at 7:05
Just do
'a' in arr
– W-B
Nov 11 at 7:05
I believe you're expecting
True
because, you see 'a' in arr in arr
as True in arr
?– Austin
Nov 11 at 7:08
I believe you're expecting
True
because, you see 'a' in arr in arr
as True in arr
?– Austin
Nov 11 at 7:08
@Austin, just run this code. It output False.
– Matvey
Nov 11 at 7:23
@Austin, just run this code. It output False.
– Matvey
Nov 11 at 7:23
Please explain waht your expected result was, and why. The question as it is, is unclear
– CIsForCookies
Nov 11 at 7:27
Please explain waht your expected result was, and why. The question as it is, is unclear
– CIsForCookies
Nov 11 at 7:27
@CIsForCookies, What did you not understand? I wanna understand why the expression " 'a' in arr in arr " is False
– Matvey
Nov 11 at 7:32
@CIsForCookies, What did you not understand? I wanna understand why the expression " 'a' in arr in arr " is False
– Matvey
Nov 11 at 7:32
|
show 1 more comment
3 Answers
3
active
oldest
votes
I believe this is what you are trying to do:
arr = [1, True, 'a', 2]
print( 'a' in arr)
Output:
True
Or this:
arr = [1, True, 'a', 2]
print(bool(['a' in arr]) in arr)
Output:
True
you can just doprint(('a' in arr) in arr)
instead ofprint(bool(['a' in arr]) in arr)
but that does not check if'a'
is inarr
. It check ifTrue
is! Change arr toarr = ['a', 2]
and verify
– CIsForCookies
Nov 11 at 7:21
Question is not clear. I am assuming he wants to get the output from 'a' in arr as True and then check if True in arr.
– Sanchit Kumar
Nov 11 at 7:22
Legit. I thought OP only wants to check if'a' in arr
. Either way, what actually being checked is ifarr in arr
, and then if 'a' is in the result :-P
– CIsForCookies
Nov 11 at 7:26
bool(['a' in arr])
is almost certainly not any part of what the questioner wanted, considering it's callingbool
on a one-element list, and it'll returnTrue
no matter whether or not'a'
is inarr
.
– user2357112
Nov 11 at 8:02
add a comment |
print('a' in arr in arr) // False
is interpeted asprint('a' in arr in arr) // 0
which throws ZeroDivisionError: integer division or modulo by zero error. If you meant to comment out theFalse
, do it using"#"
, not"//"
(e.g.print('a' in arr in arr) # False
)
'a' in arr in arr
is read from right to left[1]: check ifarr in arr
(False), and then check if'a' in False
(False)
Using @Klaus D's helpful comment -print('a' in arr in arr)
is evaluated asprint(('a' in arr) and (arr in arr))
due to operator chaining. This, in turn is processed intoprint(True and False)
->print(False)
To check if 'a'
is in arr
, just check print('a' in arr)
# prints True
[1] Well, not exactly. As can seen from [ In which order is an if statement evaluated in Python ], the evaluation is right to left ,so this is what actually happens: (1) check if 'a' is in "something". (2) evaluate this "something" by checking if arr in arr
. (3) use the reault of said something (which is False
as sadly, arr
isn't a member of itslef) and check if 'a'
is inside that (meaning, check if 'a' in True
, which again, is False[1]
1. Yeah, i'm sorry. There must be a "#"
– Matvey
Nov 11 at 7:35
2.'a' in False
is incorrect expression. It will throws error.
– Matvey
Nov 11 at 7:36
2
1. Actually it is a comparison operator chaining and will be interpreted as('a' in arr) and (arr in arr)
.
– Klaus D.
Nov 11 at 7:48
@KlausD, You're right. Thanks, man. It's correct answer for my question.
– Matvey
Nov 11 at 7:52
add a comment |
It is False
because 'a'
is in 'arr'
but 'arr'
is not in 'arr'
.
Meaning 'arr'
can't be in itself.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53246561%2fmultiple-in-operator-in-python%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
I believe this is what you are trying to do:
arr = [1, True, 'a', 2]
print( 'a' in arr)
Output:
True
Or this:
arr = [1, True, 'a', 2]
print(bool(['a' in arr]) in arr)
Output:
True
you can just doprint(('a' in arr) in arr)
instead ofprint(bool(['a' in arr]) in arr)
but that does not check if'a'
is inarr
. It check ifTrue
is! Change arr toarr = ['a', 2]
and verify
– CIsForCookies
Nov 11 at 7:21
Question is not clear. I am assuming he wants to get the output from 'a' in arr as True and then check if True in arr.
– Sanchit Kumar
Nov 11 at 7:22
Legit. I thought OP only wants to check if'a' in arr
. Either way, what actually being checked is ifarr in arr
, and then if 'a' is in the result :-P
– CIsForCookies
Nov 11 at 7:26
bool(['a' in arr])
is almost certainly not any part of what the questioner wanted, considering it's callingbool
on a one-element list, and it'll returnTrue
no matter whether or not'a'
is inarr
.
– user2357112
Nov 11 at 8:02
add a comment |
I believe this is what you are trying to do:
arr = [1, True, 'a', 2]
print( 'a' in arr)
Output:
True
Or this:
arr = [1, True, 'a', 2]
print(bool(['a' in arr]) in arr)
Output:
True
you can just doprint(('a' in arr) in arr)
instead ofprint(bool(['a' in arr]) in arr)
but that does not check if'a'
is inarr
. It check ifTrue
is! Change arr toarr = ['a', 2]
and verify
– CIsForCookies
Nov 11 at 7:21
Question is not clear. I am assuming he wants to get the output from 'a' in arr as True and then check if True in arr.
– Sanchit Kumar
Nov 11 at 7:22
Legit. I thought OP only wants to check if'a' in arr
. Either way, what actually being checked is ifarr in arr
, and then if 'a' is in the result :-P
– CIsForCookies
Nov 11 at 7:26
bool(['a' in arr])
is almost certainly not any part of what the questioner wanted, considering it's callingbool
on a one-element list, and it'll returnTrue
no matter whether or not'a'
is inarr
.
– user2357112
Nov 11 at 8:02
add a comment |
I believe this is what you are trying to do:
arr = [1, True, 'a', 2]
print( 'a' in arr)
Output:
True
Or this:
arr = [1, True, 'a', 2]
print(bool(['a' in arr]) in arr)
Output:
True
I believe this is what you are trying to do:
arr = [1, True, 'a', 2]
print( 'a' in arr)
Output:
True
Or this:
arr = [1, True, 'a', 2]
print(bool(['a' in arr]) in arr)
Output:
True
answered Nov 11 at 7:06
Sanchit Kumar
31117
31117
you can just doprint(('a' in arr) in arr)
instead ofprint(bool(['a' in arr]) in arr)
but that does not check if'a'
is inarr
. It check ifTrue
is! Change arr toarr = ['a', 2]
and verify
– CIsForCookies
Nov 11 at 7:21
Question is not clear. I am assuming he wants to get the output from 'a' in arr as True and then check if True in arr.
– Sanchit Kumar
Nov 11 at 7:22
Legit. I thought OP only wants to check if'a' in arr
. Either way, what actually being checked is ifarr in arr
, and then if 'a' is in the result :-P
– CIsForCookies
Nov 11 at 7:26
bool(['a' in arr])
is almost certainly not any part of what the questioner wanted, considering it's callingbool
on a one-element list, and it'll returnTrue
no matter whether or not'a'
is inarr
.
– user2357112
Nov 11 at 8:02
add a comment |
you can just doprint(('a' in arr) in arr)
instead ofprint(bool(['a' in arr]) in arr)
but that does not check if'a'
is inarr
. It check ifTrue
is! Change arr toarr = ['a', 2]
and verify
– CIsForCookies
Nov 11 at 7:21
Question is not clear. I am assuming he wants to get the output from 'a' in arr as True and then check if True in arr.
– Sanchit Kumar
Nov 11 at 7:22
Legit. I thought OP only wants to check if'a' in arr
. Either way, what actually being checked is ifarr in arr
, and then if 'a' is in the result :-P
– CIsForCookies
Nov 11 at 7:26
bool(['a' in arr])
is almost certainly not any part of what the questioner wanted, considering it's callingbool
on a one-element list, and it'll returnTrue
no matter whether or not'a'
is inarr
.
– user2357112
Nov 11 at 8:02
you can just do
print(('a' in arr) in arr)
instead of print(bool(['a' in arr]) in arr)
but that does not check if 'a'
is in arr
. It check if True
is! Change arr to arr = ['a', 2]
and verify– CIsForCookies
Nov 11 at 7:21
you can just do
print(('a' in arr) in arr)
instead of print(bool(['a' in arr]) in arr)
but that does not check if 'a'
is in arr
. It check if True
is! Change arr to arr = ['a', 2]
and verify– CIsForCookies
Nov 11 at 7:21
Question is not clear. I am assuming he wants to get the output from 'a' in arr as True and then check if True in arr.
– Sanchit Kumar
Nov 11 at 7:22
Question is not clear. I am assuming he wants to get the output from 'a' in arr as True and then check if True in arr.
– Sanchit Kumar
Nov 11 at 7:22
Legit. I thought OP only wants to check if
'a' in arr
. Either way, what actually being checked is if arr in arr
, and then if 'a' is in the result :-P– CIsForCookies
Nov 11 at 7:26
Legit. I thought OP only wants to check if
'a' in arr
. Either way, what actually being checked is if arr in arr
, and then if 'a' is in the result :-P– CIsForCookies
Nov 11 at 7:26
bool(['a' in arr])
is almost certainly not any part of what the questioner wanted, considering it's calling bool
on a one-element list, and it'll return True
no matter whether or not 'a'
is in arr
.– user2357112
Nov 11 at 8:02
bool(['a' in arr])
is almost certainly not any part of what the questioner wanted, considering it's calling bool
on a one-element list, and it'll return True
no matter whether or not 'a'
is in arr
.– user2357112
Nov 11 at 8:02
add a comment |
print('a' in arr in arr) // False
is interpeted asprint('a' in arr in arr) // 0
which throws ZeroDivisionError: integer division or modulo by zero error. If you meant to comment out theFalse
, do it using"#"
, not"//"
(e.g.print('a' in arr in arr) # False
)
'a' in arr in arr
is read from right to left[1]: check ifarr in arr
(False), and then check if'a' in False
(False)
Using @Klaus D's helpful comment -print('a' in arr in arr)
is evaluated asprint(('a' in arr) and (arr in arr))
due to operator chaining. This, in turn is processed intoprint(True and False)
->print(False)
To check if 'a'
is in arr
, just check print('a' in arr)
# prints True
[1] Well, not exactly. As can seen from [ In which order is an if statement evaluated in Python ], the evaluation is right to left ,so this is what actually happens: (1) check if 'a' is in "something". (2) evaluate this "something" by checking if arr in arr
. (3) use the reault of said something (which is False
as sadly, arr
isn't a member of itslef) and check if 'a'
is inside that (meaning, check if 'a' in True
, which again, is False[1]
1. Yeah, i'm sorry. There must be a "#"
– Matvey
Nov 11 at 7:35
2.'a' in False
is incorrect expression. It will throws error.
– Matvey
Nov 11 at 7:36
2
1. Actually it is a comparison operator chaining and will be interpreted as('a' in arr) and (arr in arr)
.
– Klaus D.
Nov 11 at 7:48
@KlausD, You're right. Thanks, man. It's correct answer for my question.
– Matvey
Nov 11 at 7:52
add a comment |
print('a' in arr in arr) // False
is interpeted asprint('a' in arr in arr) // 0
which throws ZeroDivisionError: integer division or modulo by zero error. If you meant to comment out theFalse
, do it using"#"
, not"//"
(e.g.print('a' in arr in arr) # False
)
'a' in arr in arr
is read from right to left[1]: check ifarr in arr
(False), and then check if'a' in False
(False)
Using @Klaus D's helpful comment -print('a' in arr in arr)
is evaluated asprint(('a' in arr) and (arr in arr))
due to operator chaining. This, in turn is processed intoprint(True and False)
->print(False)
To check if 'a'
is in arr
, just check print('a' in arr)
# prints True
[1] Well, not exactly. As can seen from [ In which order is an if statement evaluated in Python ], the evaluation is right to left ,so this is what actually happens: (1) check if 'a' is in "something". (2) evaluate this "something" by checking if arr in arr
. (3) use the reault of said something (which is False
as sadly, arr
isn't a member of itslef) and check if 'a'
is inside that (meaning, check if 'a' in True
, which again, is False[1]
1. Yeah, i'm sorry. There must be a "#"
– Matvey
Nov 11 at 7:35
2.'a' in False
is incorrect expression. It will throws error.
– Matvey
Nov 11 at 7:36
2
1. Actually it is a comparison operator chaining and will be interpreted as('a' in arr) and (arr in arr)
.
– Klaus D.
Nov 11 at 7:48
@KlausD, You're right. Thanks, man. It's correct answer for my question.
– Matvey
Nov 11 at 7:52
add a comment |
print('a' in arr in arr) // False
is interpeted asprint('a' in arr in arr) // 0
which throws ZeroDivisionError: integer division or modulo by zero error. If you meant to comment out theFalse
, do it using"#"
, not"//"
(e.g.print('a' in arr in arr) # False
)
'a' in arr in arr
is read from right to left[1]: check ifarr in arr
(False), and then check if'a' in False
(False)
Using @Klaus D's helpful comment -print('a' in arr in arr)
is evaluated asprint(('a' in arr) and (arr in arr))
due to operator chaining. This, in turn is processed intoprint(True and False)
->print(False)
To check if 'a'
is in arr
, just check print('a' in arr)
# prints True
[1] Well, not exactly. As can seen from [ In which order is an if statement evaluated in Python ], the evaluation is right to left ,so this is what actually happens: (1) check if 'a' is in "something". (2) evaluate this "something" by checking if arr in arr
. (3) use the reault of said something (which is False
as sadly, arr
isn't a member of itslef) and check if 'a'
is inside that (meaning, check if 'a' in True
, which again, is False[1]
print('a' in arr in arr) // False
is interpeted asprint('a' in arr in arr) // 0
which throws ZeroDivisionError: integer division or modulo by zero error. If you meant to comment out theFalse
, do it using"#"
, not"//"
(e.g.print('a' in arr in arr) # False
)
'a' in arr in arr
is read from right to left[1]: check ifarr in arr
(False), and then check if'a' in False
(False)
Using @Klaus D's helpful comment -print('a' in arr in arr)
is evaluated asprint(('a' in arr) and (arr in arr))
due to operator chaining. This, in turn is processed intoprint(True and False)
->print(False)
To check if 'a'
is in arr
, just check print('a' in arr)
# prints True
[1] Well, not exactly. As can seen from [ In which order is an if statement evaluated in Python ], the evaluation is right to left ,so this is what actually happens: (1) check if 'a' is in "something". (2) evaluate this "something" by checking if arr in arr
. (3) use the reault of said something (which is False
as sadly, arr
isn't a member of itslef) and check if 'a'
is inside that (meaning, check if 'a' in True
, which again, is False[1]
edited Nov 11 at 8:13
answered Nov 11 at 7:11
CIsForCookies
6,68311546
6,68311546
1. Yeah, i'm sorry. There must be a "#"
– Matvey
Nov 11 at 7:35
2.'a' in False
is incorrect expression. It will throws error.
– Matvey
Nov 11 at 7:36
2
1. Actually it is a comparison operator chaining and will be interpreted as('a' in arr) and (arr in arr)
.
– Klaus D.
Nov 11 at 7:48
@KlausD, You're right. Thanks, man. It's correct answer for my question.
– Matvey
Nov 11 at 7:52
add a comment |
1. Yeah, i'm sorry. There must be a "#"
– Matvey
Nov 11 at 7:35
2.'a' in False
is incorrect expression. It will throws error.
– Matvey
Nov 11 at 7:36
2
1. Actually it is a comparison operator chaining and will be interpreted as('a' in arr) and (arr in arr)
.
– Klaus D.
Nov 11 at 7:48
@KlausD, You're right. Thanks, man. It's correct answer for my question.
– Matvey
Nov 11 at 7:52
1. Yeah, i'm sorry. There must be a "#"
– Matvey
Nov 11 at 7:35
1. Yeah, i'm sorry. There must be a "#"
– Matvey
Nov 11 at 7:35
2.
'a' in False
is incorrect expression. It will throws error.– Matvey
Nov 11 at 7:36
2.
'a' in False
is incorrect expression. It will throws error.– Matvey
Nov 11 at 7:36
2
2
1. Actually it is a comparison operator chaining and will be interpreted as
('a' in arr) and (arr in arr)
.– Klaus D.
Nov 11 at 7:48
1. Actually it is a comparison operator chaining and will be interpreted as
('a' in arr) and (arr in arr)
.– Klaus D.
Nov 11 at 7:48
@KlausD, You're right. Thanks, man. It's correct answer for my question.
– Matvey
Nov 11 at 7:52
@KlausD, You're right. Thanks, man. It's correct answer for my question.
– Matvey
Nov 11 at 7:52
add a comment |
It is False
because 'a'
is in 'arr'
but 'arr'
is not in 'arr'
.
Meaning 'arr'
can't be in itself.
add a comment |
It is False
because 'a'
is in 'arr'
but 'arr'
is not in 'arr'
.
Meaning 'arr'
can't be in itself.
add a comment |
It is False
because 'a'
is in 'arr'
but 'arr'
is not in 'arr'
.
Meaning 'arr'
can't be in itself.
It is False
because 'a'
is in 'arr'
but 'arr'
is not in 'arr'
.
Meaning 'arr'
can't be in itself.
answered Nov 11 at 9:40
Jack Herer
313112
313112
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53246561%2fmultiple-in-operator-in-python%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Just do
'a' in arr
– W-B
Nov 11 at 7:05
I believe you're expecting
True
because, you see'a' in arr in arr
asTrue in arr
?– Austin
Nov 11 at 7:08
@Austin, just run this code. It output False.
– Matvey
Nov 11 at 7:23
Please explain waht your expected result was, and why. The question as it is, is unclear
– CIsForCookies
Nov 11 at 7:27
@CIsForCookies, What did you not understand? I wanna understand why the expression " 'a' in arr in arr " is False
– Matvey
Nov 11 at 7:32