s is a string of digits. Return every valid IP address you can make by inserting three dots into s (without removing or reordering digits), sorted as strings. A valid address has four parts, each a number from 0 to 255 with no leading zero (the single digit "0" is fine, "01" is not).
For "25525511135": 255.255.11.135 and 255.255.111.35.
Example 1
Input:
restore_ip_addresses('25525511135')
Output:
['255.255.11.135', '255.255.111.35']
Example 2
Input:
restore_ip_addresses('0000')
Output:
['0.0.0.0']
0 <= len(s) <= 14s contains only digits.No results yet
Run your code to check it against the examples, or submit to run every test.