# your code goes here x = "dfgjj j d6f76 667d 6d66 66 df6 g5d5d 499d fg&^&^ &^76( 787 66 6 7 78 888 90 19" y = [] temp_i = 0 temp = '' temp_i = 0 while (True): if temp_i > len(x) - 1: break elif x[temp_i].isdigit(): while x[temp_i].isdigit(): temp += x[temp_i] if temp_i >= len(x) - 1: break temp_i += 1 y.append(int(temp)) if temp_i >= len(x) - 1: break temp = '' else: temp_i += 1 print (y)
Standard input is empty