(Jan-06-2019, 09:35 PM)Gribouillis Wrote:xhughesey Wrote:So I guess my question would be; How can I pull something from the end of multiple arrays with the same starting integer and put that result into an array?The question is surprising because it looks like something that is much easier than the rest of the code in the git repo. Why notgames = [ [5, -1, 7, -8, 3, "bot wins"], [5, -1, 3, -8, 7, "bot wins"], [5, -2, 4, -1, 6, "bot wins"], [5, -1, 7, -2, 3, -3, "bot loses"],] wons = sum(x[-1] == 'bot wins' for g in games) result = [1, 5, wons/len(games)]
That was my fault. I was kind of asking myself then I was going to answer myself on here. I figured it out and implemented it. I just haven't committed it yet. Thanks a lot though I was thinking way to hard about the previous question.