Python 基础语法¶ 数据类型¶ # 字符串 name = "Python" # 数字 num = 42 # 列表 items = [1, 2, 3] 常用技巧¶ # 列表推导式 squares = [x**2 for x in range(10)]