• Python 入门日记(一)—— Hello World!


    2020.07.04 Python 入门的 Day1

    成就:语言通用入门程序 “Hello World”

    print("Hello World!")
    message = "Hello Python World!"
    print(message)
    message = "LBWNB!"
    print(message)

    附录:Python 变量的命名规则

    • 变量名只能包含字母、数字和下划线。变量名只能以字母或下划线开头,不能使用数字开头。
    • 变量名不能包含空格,但可以使用下划线分隔其中的单词。
    • 不要将 Python 关键字和函数名作为变量名。
    • 变量名应该既简短又具有描述性。
    • 就目前而言,应使用小写的 Python 变量名。在变量名中使用大写字母虽然不会导致错误,但避免使用大写字母是个不错的主意

    附录:Python 关键字

    • False        class        finally        is        return
    • None        continue        for        lambda        try
    • True        def        from        nonlocal        while
    • and        del        global        not        with
    • as        elif        if        or        yield
    • assert        else        import        pass
    • break        except        in        raise

    附录:Python 内置函数

    • abs()        divmod()        input()        open()        staticmethod()        
    • all()        enumerate()        int()        ord()        str()        
    • any()        eval()        isinstance()        pow()        sum()        
    • basestring()        execfile()        issubclass()        print()        super()        
    • bin()        file()        iter()        property()        tuple()        
    • bool()        filter()        len()        range()        type()        
    • bytearray()        float()        list()        raw_input()        unichr()        
    • callable()        format()        locals()        reduce()        unicode()        
    • chr()        frozenset()        long()        reload()        vars()        
    • classmethod()        getattr()        map()        repr()        xrange()        
    • cmp()        globals()        max()        reversed()zip()        Zip()        
    • compile()        hasattr()        memoryview()        round()        _import_()        
    • complex()        hash()        min()        set()        apply()        
    • delattr()        help()        next()        setattr()        buffer()        
    • dict()        hex()        object()        slice()        coerce()        
    • dir()        id()        oct()        sorted()        intern()        

    ——《Python 编程 从入门到实践》(美·Eric Matthes  著        袁国忠  译)

  • 相关阅读:
    小程序 canvas实现图片预览,图片保存
    MySQL实现排名并查询指定用户排名功能
    微信小程序canvas把正方形图片绘制成圆形
    WINDOW 安装ImageMagick服务端和PHP的imagick插件
    安装PHP扩展32位与64位的误区(x86与x64的查看)
    linux 安装 ImageMagick 和 imagick 扩展
    php 获取顶级域名
    php中通过Hashids将整数转化为唯一字符串
    yii2项目中运行composer 过程中遇到的问题
    yii2 mysql根据多个字段的数据计算排序
  • 原文地址:https://www.cnblogs.com/A-Tree/p/13236916.html
Copyright © 2020-2023  润新知