15
Andres Scribani
Last seen 2 years ago
Member for 4 years, 7 months, 1 day
Difficulty Normal
find() method works the same as index() but instead of returning an exception, find() returns -1 if the sub-string is not in the string
first_index = word.find(first) -> does the same as your line
I can't understand the last line... it's not working for me
goes_after('Sugar', 'u', 'r') // False
More
A lambda function can help you simplify and avoid defining the price function
data.sort(key = lambda e: e.get("price"), reverse = True)
More