python第三篇-变量

来源:互联网 发布:淘宝店铺套现处罚 编辑:程序博客网 时间:2024/06/06 02:09
#!/usr/bin/python#Filename:var.pyi = 5print(i)i = i + 1print(i)s = '''This is a mutil-line string.this is the second line'''print(s)


结果:

[(4) root@Fedora~/Note/python]#./2var.py 56This is a mutil-line string.this is the second line

#这是对变量的使用
#其中定义变量 i为5,定义s为字符串,其中'''(三个单引号)可以定义一个多行的字符串,不需要进行转接符号 \
# s也可以这么定义: s = 'This is a mutil-line string. \
#                      this is the second line'                      


原创粉丝点击