list1=['192.168.0.1',22,'root',22,'redhat',22] y=0 for x in list1:     if x == 22:         y=y+1 print(y)