输入输出
2017-02-25 本文已影响0人
XYZ7
输出
>>> print('hello, world')
hello, world
print()函数也可以接受多个字符串,用逗号“,”隔开,就可以连成一串输出:
>>> print('The quick brown fox', 'jumps over', 'the lazy dog')
The quick brown fox jumps over the lazy dog
>>> print('100 + 200 =', 100 + 200)
100 + 200 = 300
输入
>>> name = input()
Michael
name = input('please enter your name: ')
print('hello,', name)