码迷,mamicode.com
首页 >  
搜索关键字:isdigit    ( 345个结果
字符串:大小写 去空格替换切割
#.lower 转化成小写字符串a = input(">>>")a1 = a.lower()print(a1) #.upper 转化成大写字符串a = input(">>>")print(a.upper()) #.isdigit 检查是否是十进制数字a = input(">>>")a1 = a.is ...
分类:其他好文   时间:2019-09-13 15:49:43    阅读次数:115
python学习第二天 pyhon字符串操作
s='cescesc' print(s.isupper)#判断是不是都是大写字母 print(s.isdigit)#判断是否位为数字 print(s.islower)#判断是不是小写字母 number=input('请输入要产生几条:') print(s.index('d'))#找不到报错 prin ...
分类:编程语言   时间:2019-09-12 13:18:59    阅读次数:98
Python-字符串
#验证码示例 #验证码升级版 #判断是否为数字 isdigit #升级版 请输入一个数字:asdf请输入数字... #去除空白lstript rstript stript #替换字符串replace, 请输入:你妹的啊***啊 #只替换前两个 请输入:你妹的 你妹的 你妹的*** *** 你妹的 # ...
分类:编程语言   时间:2019-09-10 17:41:07    阅读次数:120
python知识学习
**表示冥运算//表示相除取整\表示转义r""可用于避免转义用于将字符串相连字符串*数字表示复制字符串个数变量[0]表示变量里的第1个,[1]为第2个变量[-1]表示变量里的倒数第1个,[-2]为倒数第2个endswith()表示以xx结尾startswith()表示以xxx开头isdigit()如果字符串只包含数字则为True,否则为Falselen()返回字符串长度lowe
分类:编程语言   时间:2019-09-10 00:51:26    阅读次数:105
C#小记
1.textbox限制只输入数字 要重新定义一个KeyPress函数 private void textBox4_KeyPress(object sender, KeyPressEventArgs e) { if(e.KeyChar != 8 && !Char.IsDigit(e.KeyChar)) ...
分类:Windows程序   时间:2019-09-04 16:22:13    阅读次数:110
Python基础
1.字符串 title: 字符串大写 capitalize:首字母大写 lower:全部字母小写 upper:全部字母大写 swapcase:全部大小写翻转 isalpha:是否全部是字母 isdigit:是否全是数字 isspace:是否全是空白行 islower:字母是否全是小写 isupper ...
分类:编程语言   时间:2019-09-01 14:31:20    阅读次数:90
P2522 [HAOI2011]Problem b 题解
莫比乌斯反演 ACWing215的升级版 直接计算啊a using namespace std; define go(i,a,b) for(int i=a;i inline void read(T &x){ x=0;char f=1,c=getchar(); while(!isdigit(c)){ ...
分类:其他好文   时间:2019-08-23 12:03:12    阅读次数:124
自定义分页器
class PageInfo: def __init__(self, num_page, total, uri, pei_page=10, show_page=11): if num_page.isdigit(): num_page = int(num_page) else: num_page = ... ...
分类:其他好文   时间:2019-08-18 13:44:59    阅读次数:81
运算符优先级
运算符 描述 例子 可重载性 第一级别 :: 作用域解析符 Class::age = 2; 不可重载 第二级别 () 函数调用 isdigit('1') 可重载 () 成员初始化 c_tor(int x, int y) : _x(x), _y(y*10){}; 可重载 [] 数组数据获取 array ...
分类:其他好文   时间:2019-07-28 19:35:39    阅读次数:129
登录界面
while 1: username =input ('请输入你的注册账号:') userkey = input('请输入你的注册密码(只能是纯数字):') if userkey.isdigit(): with open('数据存储','r+',encoding='utf-8') as f: f.wr ...
分类:其他好文   时间:2019-07-27 23:57:30    阅读次数:217
345条   上一页 1 ... 4 5 6 7 8 ... 35 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!