python 学习小结 python 简明教程 1.python 文件 #!/etc/bin/python #coding=utf-8 2.main()函数 if __name__ == '__main__': 3.物理行与逻辑行; 下面是一个在多个物理行中写一个逻辑行的例子.它被称为明确的行连接. s = 'This is a string. \ This continues the string.' print s 它的输出: This is a string. This continues…
python学习心得第三章 1.三元运算 变量=值1 if 条件 else 值2 由图如果条件成立则赋值1给变量,如果条件不成立则赋值2给变量. 2.数据类型 集合:set() class set(object): """ set() -> new empty set object set(iterable) -> new set object Build an unordered collection of unique elements. "&quo…