摘要: 代码如下: 1 list_1=[1,5,4,3,2,9,8,5,4] 2 list_1=set(list_1)#将列表转化为集合 3 print(list_1,type(list_1))#打印内容和类型 4 5 list_2=set([4,8,2,1,66,55,4,2]) 6 print(list 阅读全文
posted @ 2019-12-01 16:34 腻咪 阅读(146) 评论(0) 推荐(0)
摘要: 1 ''' 2 info={ 3 'qwe':'poi', 4 'asd':"lkj", 5 'zxc':"mnb" 6 } 7 print(info)#字典是无序的 8 print(info["qwe"])#输出 9 info['qwe']="QWE"#字典中有,则是修改 改 10 info['d 阅读全文
posted @ 2019-11-26 23:06 腻咪 阅读(303) 评论(0) 推荐(0)
摘要: 1 name="liu\t ming" 2 3 print(name.capitalize())#首字母大写 4 print(name.count('i'))#统计i的个数 5 print(name.center(50,"-"))#打印50个字符,name字符串放中间 6 print(name.en 阅读全文
posted @ 2019-11-26 22:03 腻咪 阅读(196) 评论(0) 推荐(0)
摘要: 1 money=int(input('请输入你的工资:')) 2 com_list=[['1','bac',600], 3 ['2','pen',800], 4 ['3','bic',1000], 5 ['4','ipe',3000], 6 ['5','tip',5000], 7 ['6','bok 阅读全文
posted @ 2019-11-23 15:29 腻咪 阅读(966) 评论(0) 推荐(0)
摘要: client端 1 import socket 2 import os 3 import sys 4 import struct 5 #import cv2 6 #import tkinter as tk 7 from tkinter import filedialog 8 from picamer 阅读全文
posted @ 2019-11-23 14:05 腻咪 阅读(380) 评论(0) 推荐(0)
摘要: 1 #include <IRremote.h> 2 3 IRrecv irrecv(2);//将引脚2定义为接受红外信号引脚 4 decode_results results;//存放解码器的值 5 6 long F=16718055;//前的码值 7 long B=16730805;//后的码值 阅读全文
posted @ 2019-11-23 14:00 腻咪 阅读(1375) 评论(0) 推荐(0)
摘要: 1 #include <IRremote.h>//红外的库,项目->加载库->管理库->直接搜所库名 2 3 IRrecv irrecv(2);//将引脚2定义为接受红外信号引脚 4 decode_results results;//存放解码器的值 5 6 void setup() { 7 pinM 阅读全文
posted @ 2019-11-23 13:57 腻咪 阅读(1760) 评论(0) 推荐(0)
摘要: import copystr=["aa","bb","cc","dd","ee"]print(str)#查询print(str[0],str[3])#取值print(str[-1],str[-3])print(str[1:4])#切片print(str[-2:])print(str[0:3])pri 阅读全文
posted @ 2019-11-23 13:49 腻咪 阅读(451) 评论(0) 推荐(0)
摘要: 代码如下: 运行结果: 阅读全文
posted @ 2019-11-21 13:19 腻咪 阅读(141) 评论(0) 推荐(0)