随笔分类 -  Python

摘要:###Python变量的复制```pythondic = {'a': 1}dic_fake_copy = dicdic_fake_copy.update({'b': 2})print 'dic_fake_copy = %s' % dic_fake_copyprint 'dic = %s' % dic... 阅读全文
posted @ 2015-08-09 09:37 Coder816 阅读(351) 评论(0) 推荐(0)
摘要:Python字符串编码与解码在ipython shell中,设置默认编码为utf-8后,In [15]: s1 = '编程'In [16]: s2 = u'编程'In [17]: print s1编程In [18]: print s2编程In [19]: s1Out[19]: '\xe7\xbc\x... 阅读全文
posted @ 2015-08-02 21:04 Coder816 阅读(267) 评论(0) 推荐(0)