python自动化-获取参数-小结

python自动化-获取参数-小结,第1张

#将字符串转化成字典类型 account=admin,\npassword123123’格式字符串转化成数组{}
import re

import self as self

str=‘account=admin,\npassword=123123’
class Data():
def getData(self):
# 正则表达式
r=re.split(‘\W+’,str)
return r;

python中读取csv文件:

python中获得对应文件或者目录的路径;

获得现在时间:
str=time.strftime(‘%Y-%m-%d %X’)

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/867925.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-13
下一篇2022-05-13

发表评论

登录后才能评论

评论列表(0条)

    保存