str = 'OriginalString';
substring_start = str[:8]
print("Substring first 8 characters - " + substring_start)
substring_end = str[8:]
print("Substring last 8 characters - " + substring_end)
Output -
Substring first 8 characters - Original
Substring last 8 characters - String
No comments:
Post a Comment