摘要: 我的新博客已经开通了,此博客已经不用,新博客地址:http://www.codetracer.cn/ 阅读全文
posted @ 2018-04-06 20:12 CodeTracker 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 更多原创文章请到我的个人博客网站:http://www.codetracer.cn/ 本次说下我对测试人员学习一门编程语言的心得与方法,仅个人愚见。 测试人员掌握一门或者多门编程语言是必不可少的,许多测试人员对编程天生“恐惧”,其实编程并不是你想象中那样触不可及。 许多测试人员为了提升,抱着一本书( 阅读全文
posted @ 2016-02-16 09:23 CodeTracker 阅读(1018) 评论(3) 推荐(0) 编辑
摘要: 亲爱的同学们,你们好。 当你们看到这篇文章的时候,基本上答案已经出来了。#!/usr/bin/python#-*-coding:utf-8-*-import binascii#把字符串转换成该编码所对应的十六进制str1 = binascii.b2a_hex("中国")print str1#打... 阅读全文
posted @ 2015-12-18 00:00 CodeTracker 阅读(254) 评论(2) 推荐(1) 编辑
摘要: for i in range(1,10): print i# 打印# 1# 2# 3# 4# 5# 6# 7# 8# 9 阅读全文
posted @ 2015-10-14 23:39 CodeTracker 阅读(465) 评论(0) 推荐(0) 编辑
摘要: 直接上代码:#encode:u8import res1 = 'adkkdk'#判断s1字符串是否负责都为小写的正则an = re.search('^[a-z]+$', s1)if an: print 'yes'else: print 'no' 阅读全文
posted @ 2015-09-24 11:19 CodeTracker 阅读(16413) 评论(0) 推荐(0) 编辑
摘要: 直接上代码:colours = ["red","green","blue"]for colour in colours: print colour# red# green# blue第二种方法colours = ["red","green","blue"]for i in range(0, l... 阅读全文
posted @ 2015-09-24 11:11 CodeTracker 阅读(416) 评论(0) 推荐(0) 编辑
摘要: 直接上代码my @array = ( 'a', 'b', 'c', 'a', 'd', 1, 2, 5, 1, 5 ); my %count; my @uniq_times = grep { ++$count{ $_ } < 2; } @array; 阅读全文
posted @ 2015-09-24 10:58 CodeTracker 阅读(1582) 评论(0) 推荐(0) 编辑
摘要: 直接看代码吧#获取文件path路径中文件名(去掉目录路径)sub get_file_basename{ my ($file_path) = @_; my @tmp_arr = split(/[\\|\/]+/,$file_path); my $len = @tmp_arr; if ($len >=2... 阅读全文
posted @ 2015-09-23 13:54 CodeTracker 阅读(1972) 评论(0) 推荐(0) 编辑
摘要: Python数组过滤,使用规则来过滤数组中符合条件的元素。详细待补充。 阅读全文
posted @ 2015-08-21 09:44 CodeTracker 阅读(834) 评论(0) 推荐(0) 编辑
摘要: Python数组排序x = [4, 6, 2, 1, 7, 9]x.sort()print x # [1, 2, 4, 6, 7, 9]改变x自身通过复制数组方式进行排序:x =[4, 6, 2, 1, 7, 9]y = x[ : ]y.sort()print y #[1, 2, 4, 6, 7, ... 阅读全文
posted @ 2015-08-19 14:15 CodeTracker 阅读(3603) 评论(0) 推荐(0) 编辑