摘要: 一直不是很理解python中'if __name__ == '__main__':' 的作用,今天查了一下各位大神的博客,总结如下: if 语句有2个作用: 1、可以在这个if下测试函数或类,这一句与c中的main()函数所表述的是一致的,即作为入口; (这种情况可以看我刚整理的一篇博客:http: 阅读全文
posted @ 2017-04-05 17:35 回冬 阅读(310) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would hav 阅读全文
posted @ 2017-04-05 16:54 回冬 阅读(464) 评论(0) 推荐(0) 编辑