摘要:
001、利用内置函数update实现 >>> dict1 = {"a":100, "b":200} ## 测试字典1 >>> dict1 {'a': 100, 'b': 200} >>> dict2 = {"c":300, "d":400} ## 测试字典2 >>> dict2 {'c': 300, 阅读全文
posted @ 2022-08-15 14:26
小鲨鱼2018
阅读(144)
评论(0)
推荐(0)
摘要:
001、 直接利用索引实现 >>> test1 = {"a":100, "b":200, "c":300, "d":400} ## 测试字典 >>> test1 {'a': 100, 'b': 200, 'c': 300, 'd': 400} >>> test1["b"] = 8888 ## 更新字 阅读全文
posted @ 2022-08-15 14:15
小鲨鱼2018
阅读(431)
评论(0)
推荐(0)
摘要:
001、利用索引实现 >>> test1 = {"a":100, "b":200, "c":300, "d":400} ## 测试字典 >>> test1 {'a': 100, 'b': 200, 'c': 300, 'd': 400} >>> test1["e"] = 500 ## 直接利用索引实 阅读全文
posted @ 2022-08-15 14:10
小鲨鱼2018
阅读(1378)
评论(0)
推荐(0)
摘要:
001、 >>> test1 = ["a", "b", "c", "d", "e", "f", "g"] ## 测试列表 >>> test1 ['a', 'b', 'c', 'd', 'e', 'f', 'g'] >>> test1[2:-2] ## 同时删除首尾的两个字符 ['c 阅读全文
posted @ 2022-08-15 13:44
小鲨鱼2018
阅读(47)
评论(0)
推荐(0)
摘要:
001、 #include <stdio.h> #include <limits.h> int main(void) { printf("CHAR_BIT: %d\n", CHAR_BIT); return 0; } 阅读全文
posted @ 2022-08-15 02:21
小鲨鱼2018
阅读(67)
评论(0)
推荐(0)
摘要:
001、 c语言中将表示字符的char型的长度定义为1. #include <stdio.h> #include <limits.h> int main(void) { printf("sizeof(char) = %u\n", (unsigned)sizeof(char)); printf("si 阅读全文
posted @ 2022-08-15 02:14
小鲨鱼2018
阅读(400)
评论(0)
推荐(0)
摘要:
001、字符型和整型可以归纳为四大类。 char、 short int、 int、 long int。 char可以归为3类: char、signed char、unsigned char; short int可以归为两类: signed short int、 unsigned short int; 阅读全文
posted @ 2022-08-15 01:31
小鲨鱼2018
阅读(501)
评论(0)
推荐(0)
摘要:
001、二进制数、八进制数、16进制数向十进制转换 转换规则: 002、十进制数向二进制、八进制、16位进制数转换 阅读全文
posted @ 2022-08-15 00:45
小鲨鱼2018
阅读(393)
评论(0)
推荐(0)

浙公网安备 33010602011771号