摘要: 定义数组 mylist1 = ['a','b','c'] mylist2 = list() >>> type(mylist1)<class 'list'>>>> type(mylist2)<class 'list'> 取值 >>> mylist1[0]'a'>>> mylist1[1]'b' 切片取 阅读全文
posted @ 2019-09-22 21:40 gidos 阅读(674) 评论(0) 推荐(0)
摘要: 浮点数 >>> type(1.34)<class 'float'> 整形>>> type(10)<class 'int'> 字符行转整形 >>> type(int("123"))<class 'int'> 整形转字符 >>> type(str(1231))<class 'str'> 整形转浮点 >> 阅读全文
posted @ 2019-09-22 21:17 gidos 阅读(249) 评论(0) 推荐(0)
摘要: mystr = "aaaa"mystr2= 'bbbb' #不区分''和"" mystr3= "CCCC" mystr4="asd123rsdfcZXVASeg" mystr5="*qwesad123meASD&^()" #第一个大写 >>> mystr.capitalize() 'Aaaa' #全 阅读全文
posted @ 2019-09-22 20:44 gidos 阅读(246) 评论(0) 推荐(0)
摘要: 单项链表和多项链表 做出链表 需要做出结构体 struct node next 指向下一个结构体 node的指针 prev 指向上一个结构体 node的指针 data 用于保存数据 可以是基本类型 也可以是结构体 我们需要用到 来自 <stdlib.h>头文件的malloc函数 动态分配内存 mal 阅读全文
posted @ 2019-09-22 19:52 gidos 阅读(251) 评论(0) 推荐(0)