08 2018 档案

摘要:(转自好心人)自己配置 adb server 端口,使用一个生僻的值。 很简单,只要在系统环境变量中定义 ANDROID_ADB_SERVER_PORT 的值即可。 最好选择一个5位数的端口号(10000 ~ 65535),不易重复。 win下只要在环境变量中增加一个ANDROID_ADB_SERV 阅读全文
posted @ 2018-08-22 09:47 studylady 阅读(205) 评论(0) 推荐(0) 编辑
摘要:使用excel时 使用cmd打开命令界面后 输入 pip install openpyxl 进行在线安装 将txt文件中的导入到excel中 阅读全文
posted @ 2018-08-17 16:35 studylady 阅读(1399) 评论(0) 推荐(0) 编辑
摘要:#将 列表转换成 字典格式 l=['苹果(600000)', '橘子(600001)'] #列表类型 dic={} for x in l: # 对列表遍历后 【x】为列表类型 c=x.split("(") #使用split分割后 c为 列表类型 d=c[0] #列表取值 使用 索引格式 e=c[1].replace(")","") dic[e]=d #字典... 阅读全文
posted @ 2018-08-17 09:57 studylady 阅读(945) 评论(0) 推荐(0) 编辑
摘要:#打开文件 f=open("f://testpi//stock2.txt","r") #接收文件内容 (readlines 读取后的内容格式是 列表) content=f.readlines() # print(content) #将列表转换成字符串(因为换成字符串后容易进行操作) for x in content: s=x f.close() #新建一个新的文件 f2=open("f:... 阅读全文
posted @ 2018-08-15 10:44 studylady 阅读(667) 评论(0) 推荐(0) 编辑
摘要:#计算 一个字符串内相同key值下 不同value显示多少个 li=[{"name":"a"},{"name":"b"},{"name":"a"}] s=[] for x in li: # print (x["name"]) s.append(x["name"]) print(s) ss=set(s) print(ss) b=len(ss) print("不重复个数: ",b)... 阅读全文
posted @ 2018-08-09 14:08 studylady 阅读(134) 评论(0) 推荐(0) 编辑
摘要:# 统计一个字符串中各个字符个数 # # words="hello word" # wordsCount={} # for i in words: # if i!=" ": # wordsCount[i]=0 # for i in words: # if i != " ": # wordsCount[i] +=1 # print(wordsCoun... 阅读全文
posted @ 2018-08-09 11:44 studylady 阅读(413) 评论(0) 推荐(0) 编辑
摘要:#方法1 使用函数 def lenth1(lists): lists=lists.replace(" ","%20") # print(lists) return lists,len(lists) list1 = "Besttest andashu" b=lenth1(list1) # print(list1) print(b) # 使用for循环 def repla... 阅读全文
posted @ 2018-08-09 08:46 studylady 阅读(453) 评论(0) 推荐(0) 编辑
摘要:# 实现b的倒叙 c=b[::-1] print(c) # 使用join函数连接 d=" ".join(c) print("倒叙后显示",d) # 方法2 使用for循环 a="today is best" b=a.split() print(b) # 倒叙排序 c=b[::-1] print(c) list="" for x in c: list=list+x+" " prin... 阅读全文
posted @ 2018-08-08 17:32 studylady 阅读(124) 评论(0) 推荐(0) 编辑