摘要: 1.字典遍历 d = {1:11,2:22} for x in d: print d[x] for k,v in d.items(): print k print v 阅读全文
posted @ 2016-02-18 00:12 lecong-Lee 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 1.整除与幂运算 >>> 5.6//2 2.0 >>> 2**3 8 >>> 2.位移与异或算法 >>> 1<<1 2 >>> 1>>1 0 >>> 1^2 3.字符串 >>> str="abcde" >>> str[1:4] 'bcd' >>> str[2:] 'cde' >>> str[::1] 阅读全文
posted @ 2016-02-16 00:12 lecong-Lee 阅读(329) 评论(0) 推荐(0) 编辑
摘要: 两种json字符串拼接的方法如下:+ (NSString *)UIUtilsFomateJsonWithDictionary:(NSDictionary *)dic { NSArray *keys = [dic allKeys]; NSString *string = [NSString str... 阅读全文
posted @ 2015-09-30 11:49 lecong-Lee 阅读(2079) 评论(0) 推荐(0) 编辑