Is there any way to do following task in python?, i have a 2 or more tuples of string in python in that sometimes 1st string is different and all others are the same so I want output like the following-
a1=[('1','a','b','3'),('2','a','b','3')]
# yields ['1','2']
a2=[('23','j','k','l'),('2','j','k','l'), ('34','j','k','l')]
# yields ['23','2','34']