Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRutendo Chidewu
3,529 Pointsfilter()
now create a variable named dt_2012 that uses filter() and is_2012 to return only the datetimes from dates that are from the year 2012
nakalkucing
12,964 PointsHi Rutendo Chidewu! Would you mind posting a link to the challenge you're having trouble with? And also, I don't understand what you're having trouble with, do you mind explaining in a little more detail? Thanks. :)
Happy coding!
1 Answer
Chris Freeman
Treehouse Moderator 68,423 PointsIn the filter challenge Task 2, you are asked to use the built-in filter() to get only the dates that return True
based on the function is_2012
. The format is
results = filter(function_name, iterable)
Can you use what you have from Task 1 to create your variable dt_2012
?
Post back if you need more help. Good luck!!
Rutendo Chidewu
3,529 PointsRutendo Chidewu
3,529 PointsNow create a variable named dt_2012 that uses filter() and is_2012 to return only the datetimes from dates that are from the year 2012.