学习笔记(2):零基础掌握 Python 入门到实战-一个圆点的何去何从(二)

    科技2025-08-17  16

    立即学习:https://edu.csdn.net/course/play/26676/338772?utm_source=blogtoedu

    >>> 2 2 >>> type(2) <class 'int'> >>> type(333) <class 'int'> >>> type(3.14) <class 'float'> >>> int(3.14) 3 >>> int(3.8) 3 >>> float(3) 3.0 >>> type(3) <class 'int'> >>> type(3) <class 'int'> >>> int() 0 >>> id(3) 140723921475296 >>> id(3.0) 2375928079248 >>> a = 2 >>> a 2 >>> b = 5 >>> b 5 >>> 5 % 2 1 >>> divmod(5,2) (2, 1) >>> 5//2 2 >>> help(id)

    >>> 0.1+0.2 0.30000000000000004 >>> round(0.1+0.2) 0 >>> round(1.2345,3) 1.234

    >>> round(0.1+0.2, 2) 0.3

    相关资源:四史答题软件安装包exe
    Processed: 0.015, SQL: 8