美文网首页
#Chapter1# Python Basics

#Chapter1# Python Basics

作者: Jacaranda2016 | 来源:发表于2018-04-29 20:25 被阅读9次

    1. Everything in Python is an object: every number, string, data structure, function, class, module are all referred to as a Python object.

    2. Variables and argument passing

    a=[1,2,3]  # assigning a variable, we are creating a reference to the object on the right side of the equals sign

    b=a  # [1,2,3] has not been copies; now a and b refer to the same object

    3. Dynamic reference, strong type

    Object reference in Python has no type associated with them.Variables are names for objects within a particular namespace; the type information is stored in the object itself. But Python is a strong type language.

    4. Mutable and immutable objects

    lists, dictionaries, NumPy arrays and self-defined are all mutable; tuple, string are immutable.

    5. Scalar types

    scalars/scalar types: numerical data, strings, boolean values, and dates and time.

    相关文章

      网友评论

          本文标题:#Chapter1# Python Basics

          本文链接:https://www.haomeiwen.com/subject/rjlalftx.html