New answers tagged

0

Great tips from the other answer, here are just some more bits and bobs. Use the library capabilities to their fullest char1 = a new_list = data new_list.remove(char1) char2 = random.choice(data) new_list.append(char1) This, in addition to the uncommon indentation sticks out to me. Why are we removing, why are we adding, why are we redefining? ...


3

I'm not going to go too heavily into refactoring the whole thing. Some basic readability things: return_values = compare(options[0], options[1], score) score = return_values[1] lost = return_values[0] It would be much clearer if you did: lost, score = compare(options[0], options[1], score) You have indented things with two spaces, which is odd, normally ...


Top 50 recent answers are included