Original Reddit post

I asked Gemini to give me all the days that have “d” in them. It returned - Monday, Wednesday, Thursday, Sunday (Interestingly, Tuesday, Friday, and Saturday are the only ones left out!) When I asked it to write a Python code to solve it, it wrote days_of_week = [ “Monday”, “Tuesday”, “Wednesday”, “Thursday”, “Friday”, “Saturday”, “Sunday” ] days_with_d = [day for day in days_of_week if ‘d’ in day.lower()] print(f"Days containing the letter ‘d’: {days_with_d}") Why is the code correct, and not the conversation? submitted by /u/panda_drinking_water

Originally posted by u/panda_drinking_water on r/ArtificialInteligence