If I have a collec开发者_StackOverflowtion, such as Collection<String> strs, how can I get the first item out? I could just call an Iterator, take its first next(), then throw the Iterator away.
目录前置知识可迭代对象如何判断一个对象是否是可迭代对象?enumerate函数多嵌套列表总结前置知识如果给定一个list或tuple,我们可以通过for循环来遍历这个list或tup...