How to remove the first n characters from a string in Python

Removing the first n characters from a string s leaves a string of the remaining characters.

Solution for How to remove the first n characters from a string in Python : You can use string slicing to remove the first n characters To remove the first n characters from string, use string[n:]

To save the first n characters along with the rest of the string use the above method while also storing string[:n]

s = "prefix"


how-to-remove-the-first-n-characters-from-a-string-in-python