file cycle
# Author:Alex
# Date:2017.06.07
# Version:3.6.0
with open('james.txt') as jaf:
data = jaf.readline()
james = data.strip().split(',')
# james.sort()
with open('julie.txt') as jul:
data = jul.readline()
julie = data.strip().split(',')
# julie.sort()
with open('sarah.txt') as sar:
data = sar.readline()
sarahs=data.strip().split(',')
# sarahs.sort()
with open('mikey.txt') as mik:
data = mik.readline()
mikeys=data.strip().split(',') def sanitize(time_string):
if '-' in time_string:
splitter = '-'
elif ':' in time_string:
splitter = ':'
else:
return (time_string)
(mins,secs) = time_string.split(splitter)
return (mins + '.' + secs) clean_james = []
clean_julie = []
clean_mikeys = []
clean_sarah = [] for each_t in james:
clean_james.append(sanitize(each_t))
for each_t in julie:
clean_julie.append(sanitize(each_t))
for each_t in mikeys:
clean_mikeys.append(sanitize(each_t))
for each_t in sarahs:
clean_sarah.append(sanitize(each_t)) print (sorted(clean_james))
print (sorted(clean_julie))
print (sorted(clean_mikeys))
print (sorted(clean_sarah))
file cycle的更多相关文章
- [Storm] java.io.FileNotFoundException: File '../stormconf.ser' does not exist
This bug will kill supervisors Affects Version/s: 0.9.2-incubating, 0.9.3, 0.9.4 Fix Version/s: 0.10 ...
- codeforces 557 D. Vitaly and Cycle 组合数学 + 判断二分图
D. Vitaly and Cycle time limit per test 1 second memory limit per test 256 megabytes input sta ...
- swat主流域文件(file.cio)参数详解——引自http://blog.sciencenet.cn/blog-922140-710636.html
% file.clo,即主流域文件用于文件管理,包括与模型选项.气候输入.数据库和输出控制相关的信息. Master Watershed File: file.cio Project Descript ...
- Gartner: Hype Cycle for Emerging Technologies-2012 (技术成熟度曲线) [转]
英文稿: The “Hype Cycle for Emerging Technologies” report is the longest-running annual Hype Cycle, p ...
- Keil AGDI Header File
#ifndef __AGDI__INCED___ #define __AGDI__INCED___ //---Revision History: --------------------------- ...
- Linux操作系统报:read-only file system
在对集群测试过程中发现系统中某一节点中的磁盘变成read-only file system,从而导致测试任务出错,从网上查找资料,找到以下解决方案: 这个报错的意思是硬盘属性变成只读,不可写入: VO ...
- JS 更改表单的提交时间和Input file的样式
JS转换时间 function renderTime(data) { var da = eval('new ' + data.replace('/', '', 'g').replace('/', '' ...
- Sharing The Application Tier File System in Oracle E-Business Suite Release 12.2
The most current version of this document can be obtained in My Oracle Support Knowledge Document 13 ...
- PAT1122: Hamiltonian Cycle
1122. Hamiltonian Cycle (25) 时间限制 300 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue The ...
随机推荐
- 【ZooKeeper】单机伪集群搭建(适用于mac)
1.配置 .zookeeper下载地址:http://apache.mirrors.lucidnetworks.net/zookeeper/ 可以选择需要的版本,我下载的是zookeeper-3.4. ...
- hibernate的AnnotationHelloWorld
来龙去脉: 最开始sun这个土鳖设计了EJB2.0.EJB2.1那个时代.后来有人发现设计的很烂,不好用,就设计了hibernate,,人们发现用hibernate反而比EJB2.0.2.1好,hib ...
- DOS命令行操作MySQL数据库中文乱码问题解决
我们在 dos 命令行操作中文时,会报错 ’); ERROR (HY000): Incorrect string value: '\xD5\xC5\xC8\xFD' for column 原因:因为 ...
- graphql pass arg
; ; var xhr = new XMLHttpRequest(); xhr.responseType = 'json'; xhr.open("POST", "http ...
- Hadoop Metrics2
来源:Hadoop Metrics2 Metrics are collections of information about Hadoop daemons, events and measureme ...
- IOS渐变图层CAGradientLayer
看支付宝蚂蚁积分,天气预报等好多APP都有圆形渐变效果,今天就试着玩了. 一.CAGradientLayer类中属性介绍 CAGradientLayer继承CALayer,主要有以下几个属性: 1.@ ...
- 解决 swap file “*.swp”already exists!问题
用vim编辑文件实际上是先copy一份临时文件,病映射到内存给你编辑,编辑的是临时文件,当执行:w后才保存临时文件到原文件,执行:q后才删除临时文件. 每次启动检索是否有临时文件,有就询问如何处理, ...
- C#中获取各种路径获取方法
// 获取程序的基目录.System.AppDomain.CurrentDomain.BaseDirectory // 获取模块的完整路径,包含文件名System.Diagnostics.Proces ...
- SQLite数据类型(学习必备)
最近在学习android端的数据库,以下知识点作为备用- 一.存储种类和数据类型: SQLite将数据值的存储划分为以下几种存储类型: NULL: 表示该值为NULL值. INTEGE ...
- Transfer-Encoding:chunked 返回数据过长导致中文乱码
最近在写一个项目的后台时,前端请求指定资源后,返回JSON格式的数据,突然发现在返回的字节数过大时,最后的message中文数据乱码了,对于同一个接口的请求:当数据小时不会乱码,当数据量大了中文就乱码 ...