Find number of tuples in a list of lists and then out of those find number of tuples

I am given a list of lists as below.
A = [[F1,S1],[F2,S2],[F3,S3],[F1,S2],[F2,S3],[F3,S2],[F2,S1],[F4,S1],[F4,S3],[F5,S1]]
find the number of tuples where S==S1. Then out of those tuples, find the number of tuples where F1==F1.

How can I achieve this. in python

You already have demonstrated the knowledge necessary to do this.

So you tell me, how do you achieve it.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.