I am trying to create a new function that will retrieve dates and claims for a desired year. I am stuck on the last bit of code. I need to use a return command at the end. I am thinking I need to append my list, but not sure.

def getClaimsByYear(dates, claims, desiredYear):
    claimsInYear = []
    for i in range(len(dates)):
        dates = dates(i)
        claim = claims(i)
        parts = date.split("/")
        year = int(parts[2])

You can view some videos in youtube on help with Python3/Jupyter Notebook Code

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.