2020-08-18

1+1
2

测试

myString = 'hello world!'
myString
'hello world!'
print (myString)
hello world!
print ('\\\n\\')
\
\
print ('\\\t\\')
\   \
print (r'\\\t\\')
\\\t\\
print ('I\'m OK!')
I'm OK!
print ('I\'m learning\nPython')
I'm learning
Python
print ('''line1
... line2
... line3''')
line1
line2
line3
print ('''line1
line2
line3''')
line1
line2
line3
print (r'''line1 
... line2 
... line3''')
line1 
line2 
line3
True
True
False
False
3>2
True
3<2
False
python 可以直接输出多个字符串,以","隔开
print ('The quick brown fox','jumps over','the lazy dog')
The quick brown fox jumps over the lazy dog
print ('300')
300
print (100 + 200)
300
print ('100 + 200 =',100 + 200)
100 + 200 = 300
name = input()
LiLi
name
'LiLi'
name = input('please enter your name')
print ('hello',name)
please enter your namelyly
hello lyly

  • 执行简单脚本


    image.png
image.png

你可能感兴趣的:(2020-08-18)