码迷,mamicode.com
首页 > 其他好文 > 详细

len字符串的长度

时间:2016-12-23 19:21:31      阅读:135      评论:0      收藏:0      [点我收藏+]

标签:als   字符串   return   bsp   else   class   长度   false   nbsp   

 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字符串的长度

标签:als   字符串   return   bsp   else   class   长度   false   nbsp   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!