Ad
  • Custom User Avatar

    I am also getting same error:
    increment_string
    str4=int(str(newL))
    ValueError: invalid literal for int() with base 10:

    Please someone help me

  • Custom User Avatar

    Hi all. My code is written in Python passes all tests. On my workstation there are no errors. Does anyone know why Codewars I get this error:
    Traceback:
    in
    in increment_string
    ValueError: invalid literal for int() with base 10: '1h785369=v%97758225856s28985409geMYX+V36b07EP{ 620900899'

    I think that error occurs because of this place in the code:
    if s[i].isdigit():
    num = int(s[i:]) + 1
    null = "
    if len(str(num)) < len(s[i:]):
    for j in range(len(s[i:]) - len(str(num))):
    null = null + '0'
    num = s[:i] + null + str(num)
    return num

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution