IndexError: list index out of range, substring from string
Question:
I have a function for extacting a substring from a string.
And it returns the correct result.
Answers:
Oke, this works:
print(allSubstring[0]) if len(allSubstring) > 0 else 'null'
I have a function for extacting a substring from a string.
And it returns the correct result.
Oke, this works:
print(allSubstring[0]) if len(allSubstring) > 0 else 'null'