摘要:
直接上代码:#encode:u8import res1 = 'adkkdk'#判断s1字符串是否负责都为小写的正则an = re.search('^[a-z]+$', s1)if an: print 'yes'else: print 'no' 阅读全文
摘要:
直接上代码:colours = ["red","green","blue"]for colour in colours: print colour# red# green# blue第二种方法colours = ["red","green","blue"]for i in range(0, l... 阅读全文
摘要:
直接上代码my @array = ( 'a', 'b', 'c', 'a', 'd', 1, 2, 5, 1, 5 ); my %count; my @uniq_times = grep { ++$count{ $_ } < 2; } @array; 阅读全文