摘要: >>> exp='welcom to python'>>> for i in exp: print(i,end=' ') w e l c o m t o p y t h o n >>> >>> weeks=['星期一','星期二','星期三','星期四','星期五','星期六','星期天']>>> 阅读全文
posted @ 2017-03-18 22:04 xiongjiawei 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 三元操作符 阅读全文
posted @ 2017-03-18 21:52 xiongjiawei 阅读(1443) 评论(0) 推荐(0) 编辑
摘要: 1 >>> a=520 2 >>> type(a) 3 4 >>> a='520' 5 >>> type(a) 6 7 >>> a=5.2 8 >>> type(a) 9 10 >>> a=True 11 >>> type(a) 12 1 >>> a=True 2 >>> type(a) 3 4 >>> isinstance(a,bool) 5 Tr... 阅读全文
posted @ 2017-03-18 20:22 xiongjiawei 阅读(383) 评论(0) 推荐(0) 编辑
摘要: 1 >>> name='萧峰' 2 >>> print(name) 3 萧峰 4 >>> name="独孤求败" 5 >>> print(name) 6 独孤求败 7 >>> 1 >>> p='C:\Users\lenovo\Desktop\python' 2 SyntaxError: (unicode error) 'unicodeescape' codec can't deco... 阅读全文
posted @ 2017-03-18 18:54 xiongjiawei 阅读(10466) 评论(0) 推荐(0) 编辑
摘要: 1 Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit (Intel)] on win32 2 Type "copyright", "credits" or "license()" for more 阅读全文
posted @ 2017-03-18 18:12 xiongjiawei 阅读(1013) 评论(0) 推荐(0) 编辑
摘要: 1 import random 2 luckyNum=random.randint(2,9) 3 i=1 4 while i<=3: 5 guessNum=input("请你猜猜我的幸运号码:") 6 guessNnmToInt=int(guessNum) 7 if luckyNum==guessN 阅读全文
posted @ 2017-03-18 18:07 xiongjiawei 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-03-18 17:30 xiongjiawei 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 1 public class Test { 2 public static void main(String[] args) { 3 String str="135axy"; 4 String regEx="[0-9]{1,3}[a-z]{2,3}"; 5 boolean m=str.matches 阅读全文
posted @ 2017-03-17 19:51 xiongjiawei 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 1 String date="${__javaScript((new Date()).getFullYear()+'-'+((new Date()).getMonth()+1)+'-'+(new Date()).getDate(),)}"; 2 log.info("获取当前日期:"+date); 3 阅读全文
posted @ 2017-03-17 16:08 xiongjiawei 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 如题 阅读全文
posted @ 2017-03-17 13:28 xiongjiawei 阅读(590) 评论(0) 推荐(0) 编辑