zoukankan      html  css  js  c++  java
  • 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  著        袁国忠  译)

  • 相关阅读:
    基于Servlet+smartUpload的文件上传
    基于Servlet+smartUpload的文件上传
    基于Servlet+smartUpload的文件上传
    dispatch_async 的 block 中是否该使用_weak self
    dispatch_async 的 block 中是否该使用_weak self
    dispatch_async 的 block 中是否该使用_weak self
    dispatch_async 的 block 中是否该使用_weak self
    Vagrant Tip: Virtualbox Guest Additions
    Vagrant Tip: Virtualbox Guest Additions
    Vagrant Tip: Virtualbox Guest Additions
  • 原文地址:https://www.cnblogs.com/A-Tree/p/13236916.html
Copyright © 2011-2022 走看看