Exercise: Find the alphabet within gibberish
Locate the position of the alphabet in this mysterious, lengthy string. Utilize the
str.find()
method for this purpose, then extract the alphabet from the gibberish with string slicing.gibberish = 'absdqwjbasdbqwlabcdefghijklmnopqrstuvwxyz'
# use str.find() to find the alphabet
index =
# use slicing str[:] to extract the alphabet
alphabet =
print(alphabet)
Python
Setting up Python environment...
Output