defpart_one():word_twice_count=0word_three_times_count=0withopen('input.txt','r')asinput_file:forlineininput_file:line_counter=Counter(line)if2inline_counter.values():word_twice_count+=1if3inline_counter.values():word_three_times_count+=1checksum=word_twice_count*word_three_times_countprint'checksum is '+str(checksum)
My edited solution for part one with collections Counter
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
My edited solution for part one with collections Counter