Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~422 People Reached
Favorite Forums
Favorite Tags
Member Avatar for pythonhelp11

I need to create a code that will extract the dob from a array of string, like this [iCODE]finddob(["name:bob grade:a dob:1980","dob:1976 name:kate grade:c"])[/iCODE] [CODE]def finddob(listofstrings): recordnum = 0 while(recordnum < len(listofstrings)): yearstart = listofstrings[recordnum].find("dob:") + 4 yearend = listofstrings[recordnum].find(yearend) year = int(listofstrings[yearstart, yearend]) if(year > 1990): print("Is over 21") else: …

Member Avatar for woooee
0
422