开启学习之旅
# coding=utf-8
# This is a sample Python script.
# 变量赋值
counter =999 # 赋值整型变量
miles =1234.9 # 浮点型
name ="John" # 字符串
print counter
print miles
print name
#多变量赋值
a = b = c =1
print a
print b
print c
print a+b+c
#python四个数据类型
#Numbers(数字)
#String(字符串)
#List(列表)
#Tuple(元组)
#Dictionary(字典)
#数字
num =1
numtwo =2
print num
print numtwo
#字符串
s ="abcdef"
print s
# 输出字符串中第1个至第4个之间的字符串
print s[1:5]
# 输出从第3个字符开始的字符串
print s[2:]