1st code: ask_posts =  show_posts =  other_posts =  for row in hn: title = row title = title.lower() if title.startswith("ask hn"): ask_posts.append(title) elif title.startswith("show hn"): show_posts.append(title) else: other_posts.append(title) 2nd code : posts =  for row in hn: title = row if title.lower().startswith("ask hn"): posts.append(title) print(len(ask_posts)) print(len(posts)) print(posts == ask_posts)
What I expected to happen:
I expected ask_posts and posts to be same, though the len function shows they have the same length but when i check if they are identical, it says false. it’s almost the same code except i used .lower() method inside the if statement in the 2nd code.
Replace this line with the output/error
<!--NO ERROR JUST EXPECTED POSTS AND ASK_POTS WOULD BE SAME--!>