Source Code:
(back to article)
original_string = "Hello, world!" # Get the first 5 characters substring = original_string[:5] print(substring) original_string = "Hello, world!" # Get all characters after the 7th character substring = original_string[7:] print(substring)
Result:
Report an issue