Answers for "see all the character in python string"

2

python get all characters

import string

# all the lowercase and uppercase letters
print(string.ascii_letters)
# every printable key on your keyboard
print(string.printable)
# every digit
print(string.digits)
Posted by: Guest on February-08-2020
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

Code answers related to "see all the character in python string"

Python Answers by Framework

Browse Popular Code Answers by Language