摘要: list print(classmates) classmates.pop()print(classmates) classmates.pop(1)print(classmates) classmates[1] = 'Sarah'print(classmates) L = ['Apple', 123 阅读全文
posted @ 2018-12-28 10:50 九头龙鳌龟 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 字符串 print('包含中文的str') print(ord('A'))print(ord('中'))print(chr(66))print(chr(25991))print('\u4e2d\u6587')print('ABC'.encode('ascii'))print('中文'.encode( 阅读全文
posted @ 2018-12-28 09:57 九头龙鳌龟 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 字符串 print('I\'m ok.')print('I\'m learning\nPython.')print('\\\n\\')print('\\\t\\')print(r'\\\t\\')print('''linel...line2...line3''') print('''linellin 阅读全文
posted @ 2018-12-28 09:54 九头龙鳌龟 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 输出 print ('hello, world') print('The quick brown fox', 'jumps over', 'the lazy dog') print(300) print(100+200) print('100 + 200 = ', 100 + 200) 输入 nam 阅读全文
posted @ 2018-12-28 09:50 九头龙鳌龟 阅读(237) 评论(1) 推荐(0) 编辑