摘要:
# Author:Adminone #import login import sys print(sys.path) #打印环境变量 print(sys.argv) #打印脚本绝对路径['E:/python S14/day1/sys_mod.py'] print(sys.argv[2]) ''' ' 阅读全文
摘要:
# Author:Adminone names = ("alex",'jack') names.append('ddd') 阅读全文
摘要:
# Author:Adminone ''' 程序练习 请闭眼写出以下程序。 程序:购物车程序 需求: 启动程序后,让用户输入工资,然后打印商品列表 允许用户根据商品编号购买商品 用户选择商品后,检测余额是否够,够就直接扣款,不够就提醒 可随时退出,退出时,打印已购买商品和余额 ''' product 阅读全文
摘要:
# Author:Adminone name = "my \tname is {name} and i am {year} old" print(name.capitalize()) print(name.count("a")) print(name.center(50,"-")) print(na 阅读全文
摘要:
# Author:Adminone ''' #key-value av_catalog = { "欧美":{ "www.youporn.com": ["很多免费的,世界最大的","质量一般"], "www.pornhub.com": ["很多免费的,也很大","质量比yourporn高点"], "l 阅读全文
摘要:
# Author:Adminone __author__ = "Alex Li" data = { '北京':{ "昌平":{ "沙河":["oldboy","test"], "天通苑":["链家地产","我爱我家"] }, "朝阳":{ "望京":["奔驰","陌陌"], "国贸":{"CICC" 阅读全文
摘要:
# Author:Adminone import copy #names = "ZhangYang Guyun Xiangpeng XuLiangChen" names = ["ZhangYang", "Guyun","XiangPeng","XuLiangchen"] #names = ["4Zh 阅读全文
摘要:
# Author:Adminone import copy person=['name',['saving',100]] ''' #浅copy实现方式 p1=copy.copy(person) #完全切片 p2=person[:] #浅copy p3=list(person) ''' #夫妻俩 p1 阅读全文
摘要:
#!/usr/bin/env python # _*_coding:utf-8_*_ name = input("name:") #raw_input 2.x input 3.x #input 2.x = age = int(input("age:")) #integer print(type(ag 阅读全文
摘要:
# Author:Adminone age_of_oldboy = 56 for i in range(0,3): guess_age = int(input("guess age:") ) if guess_age == age_of_oldboy : print("yes, you got it 阅读全文
摘要:
# Author:Adminone ''' count = 0 while True: print("count:",count) count = count +1 #count +=1 if count == 1000: break ''' ''' for i in range(0,10): if 阅读全文
摘要:
guess任性玩.py # Author:Adminone age_of_oldboy = 56 count = 0 while count <3: guess_age = int(input("guess age:") ) if guess_age == age_of_oldboy : print 阅读全文
摘要:
password.py # Author:Adminone import getpass _username = 'alex' _password = 'abc123' username = input("username:") #password = getpass.getpass("passwo 阅读全文
摘要:
sys_mod.py # Author:Adminone ''' import sys print(sys.path) #打印环境变量 print(sys.argv) #打印脚本绝对路径['E:/python S14/day1/sys_mod.py'] print(sys.argv[2]) ''' 阅读全文