Skip to content

How to remove first few characters from string in Python?

a_string = "abcde"

sliced = a_string[2:]
Remove first 2 characters

print(sliced)
See also  How to make a sigmoid function in Python?
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.