EN
Python - remove first character from string
0
points
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!
Output:
irask is awesome!