摘要: if if <条件判断 1>: <执行 1>elif <条件判断 2>: <执行 2>elif <条件判断 3>: <执行 3>else: <执行 4> s = input('birth: ')birth = int(s)if birth < 2000: print('00 前')else: pri 阅读全文
posted @ 2019-01-02 14:35 wwchihiro 阅读(185) 评论(0) 推荐(0) 编辑
摘要: list list是一种有序的集合 >>>aaa = ['abc','bob','tracy'] >>>aaa ['abc','bob','tracy'] len()函数计算的是 str 的字符数,如果换成 bytes,len()函数就计算字节数 >>>len(aaa) 3 用索引来访问list中每 阅读全文
posted @ 2019-01-02 11:24 wwchihiro 阅读(123) 评论(0) 推荐(0) 编辑