zoukankan
html css js c++ java
Python len()方法
Python len()方法
描述
Python len() 方法返回对象(字符、列表、元组等)长度或项目个数。
语法
len()方法语法:
len
(
s
)
参数
s -- 对象。
返回值
返回对象长度。
实例
以下实例展示了 len() 的使用方法:
>>>
str
=
"
runoob
"
>>>
len
(
str
)
# 字符串长度
6
>>>
l
=
[
1
,
2
,
3
,
4
,
5
]
>>>
len
(
l
)
# 列表元素个数
5
查看全文
相关阅读:
Jquery实现类似百度的搜索框
Spring mvc 初始化过程
Git学习笔记(2)-Eclipse中Git插件使用
Git学习笔记(1)
Tomcat7设置环境变量供java代码读取
webpack+gulp实现自动构建部署
netty 粘包问题处理
java 并发工具类CountDownLatch & CyclicBarrier
add spring-boot modules to maven project
Spring Boot (#1 quick start)
原文地址:https://www.cnblogs.com/HITSZ/p/7102395.html
最新文章
pytorch中histc()函数与numpy中histogram()及histogram2d()函数
numpy 数组保存/载入
python 字符串前面加r,u的含义
leetcode 1282. Group the People Given the Group Size They Belong To
leetcode 1267. Count Servers that Communicate
gRPC 学习
微服务架构与实践
领域驱动设计
程序员的数学
CSS 世界 学习笔记
热门文章
docker nginx ssl
linux 学习笔记四
linux 学习笔记三
linux 学习笔记二
linux 学习笔记一
使用tomcat-maven-plugin自动化部署应用
AspectJ的表达式实例
Spring-AOP-学习笔记(2)-AspectJ
Spring AOP学习笔记(1)-概念
maven-将本地jar包添加到本地仓库
Copyright © 2011-2022 走看看