鱼C论坛

 找回密码
 立即注册
查看: 3390|回复: 15

各位鱼油门,谁能解答下python常用内置函数的基本含义都是干什么用的呀!急

[复制链接]
发表于 2016-8-10 15:22:13 | 显示全部楼层 |阅读模式
20鱼币
各位鱼油门,谁能解答下python常用内置函数的基本含义都是干什么用的呀!急

比如说int   temp   print;;;等等常用的解答下

最佳答案

查看完整内容

以3.5.2版为例,内置函数共有72个: ['abs', 'all', 'any', 'ascii', 'bin', 'bool', 'bytearray', 'bytes', 'callable', 'chr', 'classmethod', 'compile', 'complex', 'copyright', 'credits', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'exec', 'exit', 'filter', 'float', 'format', 'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help', 'hex', 'id', 'input', 'int', 'isinstance', 'issubclas ...
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2016-8-10 15:22:14 | 显示全部楼层
以3.5.2版为例,内置函数共有72个:
['abs', 'all', 'any', 'ascii', 'bin', 'bool', 'bytearray', 'bytes', 'callable', 'chr', 'classmethod', 'compile', 'complex', 'copyright', 'credits', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'exec', 'exit', 'filter', 'float', 'format', 'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help', 'hex', 'id', 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', 'license', 'list', 'locals', 'map', 'max', 'memoryview', 'min', 'next', 'object', 'oct', 'open', 'ord', 'pow', 'print', 'property', 'quit', 'range', 'repr', 'reversed', 'round', 'set', 'setattr', 'slice', 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'vars', 'zip']

可以用help查看说明,如:help(print)
你所说的3个,
int简单的说是是转换成一个整数(当然学到面向对象,学到类就会有新的认识)
  1. >>> int(10)
  2. 10
  3. >>> int(10.5)
  4. 10
  5. >>> int('123')
  6. 123
  7. >>> int('1000', base = 2)
  8. 8
  9. >>> int()
  10. 0
复制代码

temp不是内置函数
print是输出函数
  1. >>> print('hello')
  2. hello
  3. >>> print(123)
  4. 123
  5. >>> print(3 + 2)
  6. 5
  7. >>> print('a', 'b', 'c')
  8. a b c
复制代码

评分

参与人数 1荣誉 +5 鱼币 +5 贡献 +2 收起 理由
Rossi46 + 5 + 5 + 2

查看全部评分

小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2016-8-10 15:48:57 | 显示全部楼层
int() 把括号内的变量定义为数值型
temp不是内置函数 就是个变量名
print () 输出括号内的内容
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2016-8-10 15:53:12 | 显示全部楼层
@回复的朋友们!你们能在详细的说几个别的内置函数吗!感谢
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2016-8-10 15:54:31 | 显示全部楼层
或者是给个python3版本所有内置函数的中文解释文档也行!跪求!感谢所有的鱼油了!鱼币献上
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2016-8-10 15:57:15 | 显示全部楼层
python3.6版本里面所有的内置函数求个详细的中文解释文档?
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2016-8-10 15:57:23 | 显示全部楼层
英文就有,中文比较少
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2016-8-10 15:58:38 | 显示全部楼层
打开IDLE,按F1,就是帮助了

评分

参与人数 1荣誉 +5 鱼币 +5 贡献 +3 收起 理由
Rossi46 + 5 + 5 + 3

查看全部评分

小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2016-8-10 15:59:05 | 显示全部楼层
感谢大家,给我的答案反馈!以后再有提问,我会多多的献上鱼币的
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2016-8-15 13:38:02 | 显示全部楼层
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2016-8-18 20:28:28 | 显示全部楼层
LZ有内置函数的文档吗?
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2016-8-22 15:56:36 | 显示全部楼层
dir(__builtins__)
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2016-8-22 22:13:59 | 显示全部楼层
help()
比如:help(print)
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2017-1-16 19:26:17 | 显示全部楼层
demi2 = '<abc,//"def,gh">ssssss'
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2017-1-16 19:26:51 | 显示全部楼层
help()
比如:help(print)
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2017-1-19 10:05:50 | 显示全部楼层
学习了
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2026-2-22 04:09

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表