关于pycharm的常见问题
python官网:https://docs.python.org/zh-cn/3/using/windows.html#the-full-installer
pip升级安装难题:WARNING: You are using pip version 20.0.2, however version 20.2.3 is available.
小数点后3位
a=eval(input())
print("{:.3f}".format(pow(a,0.5))
打开文件7-1
with open("F:\\python.txt",'r+') as f:
r=f.read()
s=[i.swapcase()for i in r]
print(r)
f.seek(0)
f.writelines(s)
字典7-2
d={'a':1,'b':2,'c':3}
print(d)
读csv文件
import csv
f=open("F:\\plan.csv",'r')
s=csv.reader(f)
for i in s:
print(i)