摘要: students = [("jerry", 25), ("elaine", 24), ("John", 34), ("kramer", 34)] #把年龄在30以上的学生信息提取出来 print([item for item in students if item[1] > 30]) #把年龄在30 阅读全文
posted @ 2020-06-18 20:49 profesor 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 用strchr搜索字符,并把搜索到的字符串保存到新字符串中 #include <stdio.h> #include <string.h> #include <stdlib.h> //用于malloc(), free()函数 int main() { char s[] = "Bienvenidos a 阅读全文
posted @ 2020-06-18 19:36 profesor 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 找出字符串Bienvenidos a todos中所有的字符e #include <stdio.h> #include <string.h> int main() { char s[] = "Bienvenidos a todos"; char * p = strchr(s, 'e'); //通过这 阅读全文
posted @ 2020-06-18 19:26 profesor 阅读(202) 评论(0) 推荐(0) 编辑