导语:
本文主要介绍了关于python定义数值类型变量的方法的相关知识,包括python lambda函数,以及python变量的数据类型有哪些这些编程知识,希望对大家有参考作用。
说明
1、Python内置了很多数值类型,其中常用的有int和float。
2、var1是int类型的变量,对应数学中的整数,取值范围为(-inf,inf),即大。
实例
>>> a = 100
>>> type(a)
<class 'int'>
>>> b = 10**1000
>>> b
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
>>> type(b)
<class 'int'>
本文教程操作环境:windows7系统、Python 3.9.1,DELL G3电脑。
本文为原创文章,版权归知行编程网所有,欢迎分享本文,转载请保留出处!
你可能也喜欢
- ♥ 如何安装python openssl模块?12/17
- ♥ 什么是python闭包函数10/12
- ♥ python如何获取重定向输入10/27
- ♥ 如何在python中将数据导出到excel文件08/16
- ♥ 如何在python中输入多个参数09/30
- ♥ 如何在cmd中运行python文件10/03
内容反馈