Which of the following is membership operator? *
And
Not
In
for
Answers
Answer:
In is the answer
Explanation:
mark it as BRAINLIEST pleeeaseeeeee
Answer:
In is a memebership operator
Explanation:
Operators known as membership operators are used to confirm a value's membership. It checks whether a sequence, such as strings, lists, or tuples, is present.
The "in" operator is used to determine whether a value is present in a sequence or not. If a variable is found in the prescribed sequence, the evaluation is true; otherwise, it is false.
Python programme is a good example.
Utilizing the "in" operator, find common members in a list.
list 1=[1,2,3,4,5]
For each item in list 1: if item in list 2: print list2=[6,7,8,9] ("overlapping")
if not: print ("not overlapping")
Output:
not crossing over
The identical example, omitted the in operator:
Without utilising the "in" operator, find the common members of a list with this Python programme.
# Create the function() def overlapping(list 1, list2) that accepts two lists:
c=0
d=0
for i in list_1:
c+=1
for i in list2:
d+=1
for i in range(0,c):
for j in range(0,d):
if(list_1[i]==list2[j]):
return 1
return 0
list_1=[1,2,3,4,5]
list2=[6,7,8,9]
if(overlapping(list_1,list2)):
print("overlapping")
else:
print("not overlapping")
Output:
not overlapping
See more:
https://brainly.in/question/20597272
#SPJ3