一、函数定义# def function1(): function_suite二、函数调用# def function3(): print "测试函数" function3() #运行结果: #测试函数三、函数返回值# def function2(): &nbs
#!/usr/bin/env python # -*- coding:utf-8 -*- # @Time : 2017/10/21 0021 16:19 # @Author : ming Northeast =
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2017/11/21 0021 16:01 # @Author : ming ""&quo
语法格式:name = "hello" if 2> 1 else "world" print name # 如果条件满足,则吧hello赋值给name,如果条件不满足,则吧world赋给name
set是一个无序且不重复的元素集合,相当于字典的键,不重复,不可变一、set变量初始化A = set() #注意在创建空集合的时候只能使用s=set(),因为s={}创建的是空字典 B = {"one", "two", "three", "four"} C = set('boy') D =
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2017/10/21 0021 20:10 # @Author : ming # 输入账户余额 i&
#!/usr/bin/env python # -*- coding:utf-8 -*- welcome = "欢迎来到嘎嘎购物商场" print welcome.center(50, '-') goods = [ ("Mac Book",&
说多错多
Copyright © 2005-2025 51CTO.COM 版权所有 京ICP证060544号