python输入输出(二)



输出

>>> print(5)
5
>>> print(5*6)
30
>>> s1 = "hello"
>>> print(s1)
hello
>>> print("hello")
hello
>>> print(5, s1)
5 hello
>>> print("My age is 5")
My age is 5
>>> age = 5
>>> print("My age is %d" % age)
My age is 5

输入

<br/><br/>
>>> a = input()
1
>>> a
'1'
>>> a = input("please enter your name:")
please enter your name:jwang106
>>> a
'jwang106'
```]
原文地址:https://www.cnblogs.com/wangjiale1024/p/10301629.html