博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
python 读取文件中的字典配置
阅读量:4211 次
发布时间:2019-05-26

本文共 126 字,大约阅读时间需要 1 分钟。

python 读取文件中的字典配置

hello.txt 内容:

{	'a':'123',	'b':43}

读取hello.txt dict 文件的配置

f=open('hello.txt','r')my_dict =eval(f.read()) #字典

转载地址:http://hfwmi.baihongyu.com/

你可能感兴趣的文章
Jenkins-Email Extension Plugin
查看>>
Jenkins—Jenkins是什么
查看>>
Jenkins系列—安装与配置
查看>>
读写CSV文件
查看>>
通过SMTP发邮件
查看>>
读写EXCEL
查看>>
文件读写&文件夹遍历
查看>>
Java读写Excel
查看>>
Jenkins生成图表插件
查看>>
Bat命令
查看>>
Python学习笔记1
查看>>
Python学习笔记2
查看>>
CAPL创建与语法简介
查看>>
Nant简单功能介绍
查看>>
C++ 动态库&静态库创建和使用
查看>>
How to Create the CAPL DLL and integrated it into CANOE
查看>>
Jenkins-Build Monitor View
查看>>
Jenkins-Categorized Jobs View
查看>>
Jenkins-Join Plugin
查看>>
Jenkins-Throttle Concurrent Builds
查看>>