In Python, I have an array of,
("192.168.1.1","high"),("192.168.1.1","high"),("192.168.1.1","low"),("192.168.1.1","low"),("192.168.1.2","high"),("192.168.1.2","medium")
and I need an output by showing count
("192.168.1.1","high",2),("192.168.1.1","low",2),("192.168.1.2","high",1),("192.168.1.2","medium",1)
anyone please help me
[(*t, len(t)) for t in array]("192.168.1.1","high",2)it will appear two times.