摘要:
Looping over a range of numbersBad:for i in [0,1,2,3,4,5]: print i**2Good:for i in range(6): print i**2Looping over a collection:Bad:colors = [ ... 阅读全文
摘要:
Given an integer, write a function to determine if it is a power of two.My initial code: 1 class Solution: 2 # @param {integer} n 3 # @return ... 阅读全文