Answers for "python get char from string"

3

how to remove integer from string in python

>>> s = '12abcd405'
>>> result = ''.join([i for i in s if not i.isdigit()])
>>> result
'abcd'
Posted by: Guest on February-20-2020
1

get char of string python

string[index]
Posted by: Guest on August-24-2021
0

find char in str python

>>> str = "Messi is the best soccer player"
>>> str.find("soccer")
18
>>> str.find("Ronaldo")
-1
>>> str.find("Messi")
0
Posted by: Guest on September-16-2021

Python Answers by Framework

Browse Popular Code Answers by Language