Question: I wish to check if a certain number is in a list, but I'm struggling with the if sentence. I have

```
possibilities = []
node = 1
edges = [['1', '1', '10'], ['1', '6', '7'], ['1', '16', '5'], ['1', '18', '6'], ['1', '19', '6'], ['2', '2', '10'], ['2', '5', '3']]
for i in edges:
   if node in i[:-1]:
      possibilities.append(i)

print(possibilities)

```

But I'm not getting any entries in `possibilities`. Is there something I'm missing, because I thought this should work.

Answer: 
You are confusing the data type int with data type string. Change the node to "1" instead of 1 and you are good to go.
You are trying to compare `int` data type with `str` data type. Try this:

```
possibilities = []
node = 1
edges = [['1', '1', '10'], ['1', '6', '7'], ['1', '16', '5'], ['1', '18', '6'], ['1', '19', '6'], ['2', '2', '10'], ['2', '5', '3']]
for i in edges:
   if str(node) in i:
      possibilities.append(i)

print(possibilities)

```