Python初体验

"""
Python3 初体验
"""

# 打印HELLO
print("hello one")
print('hello two')

# 打印数组
tablist = ["a", "b"]
# 全输出
print(tablist)
# 指定输出
print(tablist[0])

# 行和缩进
if True:
    print("True")
else:
    print("a")

# 多行语句
total = "itme_one" + \
        "itme_two" + \
        "itme_three"
print(total)

# 换行效果对比
# 不换行
days = ['one', 'two', 'three']
print(days[0]), print(days[1])
# 换行
print(days[0], end=" "), print(days[1])
# 打印格式
age = 19
days = 10
print('还有{}天,是小明{}岁生日'.format(days, age))
print(f'小明{age}岁了')