随笔分类 -  笔记

摘要:#String 操作 # a="Let's go "# print(a)# 1 * 重复输出字符串# print('hello'*20) # 2 [] ,[:] 通过索引获取字符串中字符,这里和列表的切片操作是相同的,具体内容见列表# print('helloworld'[2:]) #关键字 in# 阅读全文
posted @ 2019-05-03 16:23 开飞机的舒克- 阅读(98) 评论(0) 推荐(0)
摘要:占位符 %s %d等等。。。。。%d=digit 整数%s=string 字符 关联格式化输出mas=''' test1:%s test2:%s ''' %(test_name1,test_name2) 判断是不是数字: if name.isdigit() int (name) else: prin 阅读全文
posted @ 2019-02-16 14:12 开飞机的舒克- 阅读(146) 评论(0) 推荐(0)