import revalues = ["14888838", "1111", "1359"]for s in values: if re.search(r'(\d)\1{3}', s): print(s)
Standard input is empty
14888838 1111
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!