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 an array of arraylists in Java?
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

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.