用python读取csv信息并写入新的文件
2024-09-01 20:57:28
import csv
fo = open("result.txt", "w+")
reader = csv.reader(open('test.csv'))
for line in reader:
Name = line[0]
fo.writelines(['class ',Name,'{\n'])
fo.writelines('};\n')
fo.close()
最新文章
- 简单例子了解View的事件分发
- JAVA自定义异常
- Windows 2012 装 Remote Desktop Organizer 无法连接到其他远程服务器
- subprocess module
- 设置textview背景色为透明
- C#开发的WebService使用JSON格式传递数据+Ajax测试
- tty、pty、pts等(小记)
- 文成小盆友python-num9 socket编程
- Linux-进程描述(4)之进程优先级与进程创建执行
- 自己写编程语言-m语言
- 第一章 CLR执行模型
- Introducing stapbpf – SystemTap’s new BPF backend
- SQL 加载
- Apache commons(Java常用工具包)简介
- Jmeter(二十六)Jmeter-Question之“集成Jenkins”
- jQuery插件实例四:手风琴效果[无动画版]
- Apache和Nginx的Rewrite规则对比
- 网易云 MySQL实例迁移的技术实现
- PHP通用分页类page.php[仿google分页]
- P3275 [SCOI2011]糖果 &;&; 差分约束(二)
热门文章
- redis—django-redis
- linux入门常用指令1.配置本地yum源
- intellij idea打包出来的jar包,运行时中文乱码
- 牛客练习赛53 A	超越学姐爱字符串 (DP)
- JSON 语法 数据格式
- lite-monitor 一款基于shell命令的监控系统
- freertos,串口接收数据后如何发送给任务
- BZOJ 2178: 圆的面积并 (辛普森积分)
- GNS3错误’Could not start Telnet console with command 'Solar-PuTTY.exe‘
- Codeforces Round #456 (Div. 2) 912E E. Prime Gift