摘要: 组合数据类型 1.集合类型 集合是多种元素的无序组合,(元素独一性) 集合用大括号{}表示,元素用,分隔。 用set函数建立: A=set(“python123”) {“p”,”y”,”t”,”h”,”o”,”n”,”1”,”2”,”3”} 集合操作符 集合有四种基础运算方法,并,交,差,补 S|T 阅读全文
posted @ 2018-12-13 23:37 OneWish 阅读(1760) 评论(0) 推荐(0)
摘要: 程序的控制结构 1.条件的分支结构 分支结构 if语句的格式如下: if <条件> : <语句块> 单分支 if-elif-else结构: if <条件1> : <语句块> elif <条件2>: 多分支 <语句块2> ……………. else: <语句块3> 2.程序的循环结构 遍历循环: for语 阅读全文
posted @ 2018-12-13 23:35 OneWish 阅读(1480) 评论(0) 推荐(0)
摘要: 基本数据类型 There are only two kinds of programing languages: those people always bitch about and those nobody uses . Bjarne Stroustrup 1. 数字类型 Python 语言中总 阅读全文
posted @ 2018-12-12 20:09 OneWish 阅读(620) 评论(0) 推荐(0)