Week Two
import sys
print(sys.path)
print(sys.argv)
import os
cmd_res = os.system("dir")
cmd_res = os.popen("dir").read()
print(cmd_res)
os.mkdir("new_dir")
.append
.insert(2," ")
.remove(" ")
del name[n]
.pop()
names[2] = "该换人了"
.extend([1,2,3])
.index("Tina")
.count("Tina")
.reverse() .sort()
\033[31;1m%s\033[0m
string = "my name is blablabla"
"|".join(['alex','jack','rain'])
'alex|jack|rain'
info = {'stu1102': 'LongZe Luola', 'stu1103': 'XiaoZe Maliya'}
info.get("stu1102")
'LongZe Luola'
info.setdefault("stu1102","龙泽萝拉")
info.update()
dict.fromkeys([1,2,3],'testd')
{1: 'testd', 2: 'testd', 3: 'testd'}
for key in info:
print(key,info[key])