首页 > 其他 > 详细

len字符串的长度

时间:2016-12-23 19:20:36      阅读:216      评论:0      收藏:0      [点我收藏+]
 1 #!/usr/bin/env python
 2 def fun4(x) :
 3     if len(x) > 2 :
 4 
 5         return print(x[0],x[1])
 6     else:
 7         return 0
 8 
 9 d = (sa,a,safds,aaasda)
10 fun4(d)

 

 1 def fun2(x) :
 2     if len(x) > 5 :
 3         return True
 4     else :
 5         return False
 6 
 7 
 8 s = ["w","w"]
 9 rr = fun2(s)
10 print(rr)

 

len字符串的长度

原文:http://www.cnblogs.com/shiluoliming/p/6215681.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!