zoukankan      html  css  js  c++  java
  • Python基础之内置函数

    https://docs.python.org/zh-cn/3.7/library/index.html

    内置函数:

      内置函数是什么东东?首先内置函数就一个函数,就像我们平时写的函数一样,唯一的不同是平常的函数是你自己写的,内置函数是别人写的。而且你写好了之后一般只能在本程序使用,要想在别的地方使用就必须先进行导入该函数。所以对于一些我们常用的函数,如果我们每次想要用的时候就先要写这个函数,这就很崩溃,大大增加了我们的代码量,而且每个人在写该代码的时候也会有很不一样,千奇百怪。产生了很多问题,效率,规范,等等。所以对于常用的函数,python开发者就把它们写进源码中,我们在下载python的时候就会一起下下来。在我们以后使用的时候可以直接使用这些函数。

    截止python 3.7.9 版本为止,python内置了69个内置函数,分别是:

                                         内置函数

     abs()

     delattr()

     hash()

     memoryview()

    set() 

     all()

    dict() 

    help() 

    min() 

    setattr() 

    any() 

    dir() 

    hex() 

    next() 

    slice() 

    ascii() 

    divmod()

    id() 

    object() 

    sorted() 

     bin()

    enumerate()

    input() 

    oct() 

     staticmethod()

    bool() 

     eval()

    int() 

    open() 

     str()

     breakpoint()

    exec() 

    isinstance() 

    ord() 

    sum() 

     bytearray()

     filter()

    issubclass() 

    pow() 

    super() 

     bytes()

    float() 

    iter() 

    print() 

    tuple() 

     callable()

    format() 

    len() 

    property() 

    type() 

     chr()

    frozenset() 

    list() 

    range() 

    vars() 

     classmethod()

    getattr() 

    locals() 

    repr() 

    zip() 

     compile()

    globals() 

    map() 

    reversed() 

    __import__() 

     complex()

    hasattr() 

    max() 

    round() 

     

    接下老我们对这些内置函数进行一一了解。

  • 相关阅读:
    MySQL 存储过程
    linux iptables 相关设置
    Ubuntu iptables 设置
    Mac OS 10.12
    解决:cc1.exe: sorry, unimplemented: 64-bit mode not compiled in
    go get golang.org/x/net 安装失败的解决方法!
    Ubuntu16.04
    Ubuntu16.04
    Ubuntu16.04
    在Ubuntu16.04里面安装Gogland!
  • 原文地址:https://www.cnblogs.com/tiaopixiaonaofu/p/13992507.html
Copyright © 2011-2022 走看看