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 ...
随机推荐
- 三、OPENERP 中的对象关系类型
OE中的对象关系一共分四种,one2one,one2many,many2one,many2many.他们的意思分别是一对一,一对多,多对一以及多对多. 我们新建一个模块来测试这四种类型 1.one2o ...
- linux常用多线程下载工具
1.axel 下载安装yum install axel 这个软件下载速度实时显示
- 【文档】三、Mysql Binlog事件类文件和类型
在内部,服务器使用C++类文件来表示binlog事件.标准在log_event.h文件中,这些类的方法代码在log_event.cc中. log_event是基础类.其他的详细的事件子类都是来源于他. ...
- AngularJs 指令实现选项卡
HTML: <body ng-controller="Aaa"> <my-tab my-id="div1" my-data="dat ...
- wpf 自定义ListView
1.listview.itemtemplate设置item的外层父元素的控件. 2.listview.template设置item的样式(datatemplate),也可以使用itemcontaine ...
- chrome bookmarks location
.config/google-chrome/Default file: Bookmarks
- laravel数据迁移的时候遇到的字符串长度的问题
问题截图: 问题解决办法: use Illuminate\Support\facades\Schema; Schema::defaultStringLength(191); ...
- xcopy命令的其他参数
xcopy /s /e /h "c:\123" "D:\123\" 后面多一个斜杠,让程序知道是目录 以下还给您提供了 xcopy 命令的其他参数: /A 仅复 ...
- zabbix自动发现与自动注册及SNMP监控
自动发现与自动注册 自动发现:zabbix Server主动发现所有客户端,然后将客户端登记自己的小本本上,缺点zabbix server压力山大(网段大,客户端多),时间消耗多. 自动注册:zabb ...
- Command操作数据
Command常用属性 CommandText 要下达至数据源的命令 CommandTimeout 出错时等待时间 //定义一个变量来存储对数据库操作的字符串 ...