Python 学习笔记(一)

1、内置对象

  数字  1234,3.1415, 3+4j, Decimal, Fraction

    字符串   ‘spam', "guido's".

    列表      [1, [2, 'three'], 4]

    字典      {'food':'spam', 'taste':'yum'}

    元组      (1, 'spam', 4, 'U')

    文件       f = open('demo.txt');

    集合       set('abc'), {'a', 'b', 'c'}

    其他类型  类型,None 布尔型

原文地址:https://www.cnblogs.com/jianxie/p/4226220.html