首先官方解释 S.index(sub[, start[, end]]) -> int Like S.find() but raise ValueError when the substring is not found. S.find(sub[, start[, end]]) -> int Return the lowest index in S where substring sub is found, such that sub is contained within S[start:en
函数指针 函数指针是指向函数的指针变量. 通常我们说的指针变量是指向一个整型.字符型或数组等变量,而函数指针是指向函数. 函数指针可以像一般函数一样,用于调用函数.传递参数. 函数指针变量的声明: // 声明一个指向同样参数.返回值的函数指针类型 typedef int (*fun_ptr)(int,int); 以下实例声明了函数指针变量 p,指向函数 max: #include <stdio.h> int max(int x, int y) { return x > y ? x : y
python版本 3.5 #Author by Liguangbo#_*_ coding:utf-8 _*_str="i like study python, welcome to my python program\t."#首字母大写print(str.capitalize())#I like study python, welcome to my python program.#关键字在字符串中出现的次数print(str.count(" "))#8#打印100