摘要:
#!/usr/bin/env pythondata = { '北京':{ "昌平":{ "沙河":["oldboy","test"], "天通苑":["链家地产","我爱我家"] }, "朝阳":{ "望京":["奔驰","陌陌"], "国贸":{"CICC","HP"}, "东直门" 阅读全文
posted @ 2018-11-04 20:10
rongye
阅读(414)
评论(0)
推荐(0)
摘要:
#!/usr/bin/env pythoninfo = { 'stu1101': "TengLan Wu", 'stu1102': "LongZe Luola", 'stu1103': "XiaoZe Maliya",}print(info)print(info['stu1101'])info['s 阅读全文
posted @ 2018-11-04 19:27
rongye
阅读(193)
评论(0)
推荐(0)
摘要:
My name is {name} and my age is {year}5 my name is {name} and my age is {year} Falsemy name is {name} and my age is {year}3my name is lian and my age 阅读全文
posted @ 2018-11-04 18:39
rongye
阅读(159)
评论(0)
推荐(0)
摘要:
#!/usr/bin/env pythonproduct_list = [ ('Iphone',5800), ('Mac Pro',9800), ('Bike',800), ('Watch',10600), ('Coffee',31), ('Alex Python',120),]shopping_l 阅读全文
posted @ 2018-11-04 16:50
rongye
阅读(188)
评论(0)
推荐(0)
摘要:
元组其实跟列表差不多,也是存一组数,只不是它一旦创建,便不能再修改,所以又叫只读列表 语法 1 names = ("alex","jack","eric") 1 names = ("alex","jack","eric") 1 names = ("alex","jack","eric") 1 nam 阅读全文
posted @ 2018-11-04 15:14
rongye
阅读(159)
评论(0)
推荐(0)
摘要:
['alex', ['saving', 50]]['fengjie', ['saving', 50]] 阅读全文
posted @ 2018-11-04 11:52
rongye
阅读(175)
评论(0)
推荐(0)
摘要:
我爱北京b'\xe6\x88\x91\xe7\x88\xb1\xe5\x8c\x97\xe4\xba\xac'我爱北京 阅读全文
posted @ 2018-11-04 11:08
rongye
阅读(136)
评论(0)
推荐(0)
摘要:
1 result = 值1 if 条件 else 值2 1 result = 值1 if 条件 else 值2 1 result = 值1 if 条件 else 值2 1 result = 值1 if 条件 else 值2 result = 值1 if 条件 else 值2 如果条件为真:resul 阅读全文
posted @ 2018-11-04 10:29
rongye
阅读(135)
评论(0)
推荐(0)
摘要:
#!/usr/bin/env pythonimport sysprint(sys.path)#打印环境变量print(sys.argv)#打印['F:/python/s14/day2/sys.py']及输入参数import oscmd_res = os.system("dir")#调用系统命令,直接 阅读全文
posted @ 2018-11-04 09:38
rongye
阅读(140)
评论(0)
推荐(0)
摘要:
info1=''' info of %s age:%djob:%s''' %( name,int(age),job)print(info1) info2=''' info of {_name} age:{_age}job:{_job}'''.format( _name=name, _age=age, 阅读全文
posted @ 2018-11-04 09:07
rongye
阅读(354)
评论(0)
推荐(0)

浙公网安备 33010602011771号