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 trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Holden Glass](https://secure.gravatar.com/avatar/a01abff68b80bc18e654c84726c6e7b0?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Holden Glass
6,077 Pointswhat is the time_tango input format?
So have an idea on what is coming into the function but I want to make sure that I have the data right. It is a date and time object so the incoming date would be like datetime.date(2017, 3, 1), correct? And the time would be like date time.time(17, 1, 14, 197484) right? Some clarification would be nice. Thanks.
import datetime
def time_tango(date, time):
return datetime.datetime.strptime('{} {}'.format(date, time), '%m-%d-%y %H:%M')
1 Answer
![Ryan S](https://uploads.teamtreehouse.com/production/profile-photos/5965142/micro_Ryan2.jpg)
Ryan S
27,276 PointsHi Holden,
Here is a hint: you might want to review the datetime.combine()
method.
Also, it is good to get in the habit of not naming your variables the same as python keywords or library objects. "date" and "time" already represent something in the datetime library. In this case it will pass, but it can lead to problems down the road as things get more complex.
Holden Glass
6,077 PointsHolden Glass
6,077 PointsK. Thanks. I'm starting to do a little bit of JavaScript and he just talked about names you can't use for variables because they are key words in JS.