JustPaste.it

Removing the First Character From the String in Python - TAE

The first character in a string can be removed by using the following methods: Removing the first character using the slicing technique. Removing the first character using the str.lstrip( )function.

Removing the First Character from the String in Python

String

The string is the collection of characters. The strings in Python are “immutable”; we cannot change a string once they are created. In Python, the data we input will be read as a string. In Python, string concatenation is possible.

Syntax:

my_string=input(“Data”)

Example:

my_string=input(“Python”)
print(my_string)

Output:

Python

howtoremovecharofstringinpython1.png

howtoremovecharofstringinpython1.png