[ Web Proxy ]
URL:
Viewing: https://mofanpy.com/tutorials/python-basic/basic/print [Back]  [Original]

print | Python print [print ]

x AI


print

: Huanyu Mao : : 2016-01-01

print

python print ''""

>>> print('hello world') ''' hello world ''' >>> print("hello world 2") ''' hello world 2 '''

print

+ , .

>>> print('Hello world'+' Hello Hong Kong') """ Hello world Hello Hong Kong """

print +,-,*,/.

>>> print(1+1) """ 2 """ >>> print(3-1) """ 2 """ >>> print(3*4) """ 12 """ >>> print(12/4) """ 3.0 """ >>> print('iphone'+4) # """ Traceback (most recent call last): File "<pyshell#10>", line 1, in <module> print('iphone'+4) TypeError: Can't convert 'int' object to str implicitly """

int() float()int()int, int(1.9),1,

>>> print(int('2')+3) #int """ 5 """ >>> print(int(1.9)) #intint """ 1 """ >>> print(float('1.2')+3) #float() """" 4.2 """"

:

""

wechat [wechat]
    []

    Python

    :



    Email: mofanpy@hotmail.com

    © 2022 mofanpy.com All Rights Reserved ICP20060366


    Web Proxy Viewer  |  New URL  |  Original Page