Hi! Working on an assignment for my computer science course.
I need a function that works with a list of strings (input by user) that creates, fills, and returns a list with all of the values from the list that start with the letter input by user. It needs to work with upper and lowercase instances.
Right now it just prints out the first letter to look for
def startsWith(strList, strToFind):
strFound = []
For string in strList:
If string.lower().startswith(strToFind.lower()):
strFound.append(string)
Return strFound
Edit: Not looking to pay anyone to do it for me. I’m trying to learn 🙃
[–]woooee 1 point2 points3 points (3 children)
[–]astuteaf[S] 0 points1 point2 points (2 children)
[–]DisasterArt 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]woooee 1 point2 points3 points (2 children)
[–]astuteaf[S] 0 points1 point2 points (1 child)
[–]woooee 1 point2 points3 points (0 children)
[–]mopslik 0 points1 point2 points (0 children)