Python - remove first character from string

0 points
Created by:

In this article, we would like to show you how to remove the first character from the string in Python.

Quick solution:

text = 'Dirask is awesome!'
result = text[1:]  # removes the first character
print(result)  # irask is awesome!


Practical example

In this example, we use string slicing to remove the first character from the text string.

text = 'Dirask is awesome!'

# removes the first character
result = text[1:]

print(result)  # irask is awesome!


irask is awesome!

Related posts

Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Cross technology - remove first character from string

Native Advertising
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

â€ïžđŸ’» 🙂