摘要: 一、字符串范例 str = 'abcdef' 二、字典范例 阅读全文
posted @ 2019-07-18 14:56 myy门 阅读(432) 评论(0) 推荐(0) 编辑
摘要: 分2种情况: 容器有索引,包括:list, str, tuple三种数据类型,可使用while来实现此功能。 例子: ls = [1, 3, 2, 5, 4] count = 0 while count < len(ls): print(ls[count]) count += 1 容器没有索引,包括 阅读全文
posted @ 2019-07-18 14:25 myy门 阅读(196) 评论(0) 推荐(0) 编辑