I’m trying to convert from string to int in a guided project exploring hacker news post and it’s not working. this is the code
total_ask_comments =0
for rows in ask_posts:
** num_comments = int(rows[4])**
** total_ask_comments = total_ask_comments + num_comments**
avg_ask_comments = total_ask_comments / len(ask_posts)
print(avg_ask_comments)
total_show_comments =0
for rows in show_posts:
** num_comments = int(rows[4])**
** total_show_comments = total_show_comments + num_comments**
avg_show_comments = total_show_comments / len(ask_posts)
print(avg_show_comments)
and this is error i am getting “ValueError: invalid literal for int() with base 10: ‘h’”