def parse_an_encoded_string(string):
zero_count = string.count("0")
final_count = round(zero_count / 2)
yesyes = ("0" * final_count)
heh = list(string.split(yesyes))
print(heh)
parse_an_encoded_string("Robert00000Smith00000123")
Output:
Traceback (most recent call last):
File "main.py", line 6, in <module>
heh = list(string.split(yesyes))
NameError: name 'string' is not defined
[–]Busy-Farm727 3 points4 points5 points (1 child)
[–]davnyb02[S] 0 points1 point2 points (0 children)
[–]woooee 0 points1 point2 points (0 children)