def test_sample_1(self): self.assertTrue(isSSLIP("zazbz[bzb]cdb"))
def test_sample_1(self): self.assertTrue(isSSLIP("aaa[kek]eke"))
def test_sample_1(self): self.assertTrue(isSSLIP("aba[bab]xyz"))
def test_sample_1(self): self.assertFalse(isSSLIP("xyx[xyx]xyx"))
from solution import isSSLIP count = 0 with open('../input', 'rb') as handle: for line in handle: if isSSLIP(line): count += 1 print 'Number of SSL IPs:', count