Python 入门

python输出

python输出hello,world!

  print("hello,world!")

变量

print(12+34)
print((12+34)2)
print(((12+34)
2)*3)

a = 12+34
b = a*2
c = b*3

print(a)   # 注意打印a的时候不能加引号    这是一个错误的示范"a" 

常量

变量名大写就是常量

注释

    # 单行注释  (当行注释)  不能换行
    # 多行注释  """ """ 或者 ''' '''

数据类型初识

    整形  数字

    字符串 汉字

    布尔值 对错

    列表  

    元组

    字典 

    集合

    '字符串'
    """字符串"""

转载于:https://www.cnblogs.com/ktttt/p/11116599.html