Python - remove first character from string

0 points
Created by:
Dirask Community

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[a:]  # 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

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.

â€ïžđŸ’» 🙂