摘要:
1 def crypt(source,key): 2 from itertools import cycle 3 result='' 4 temp=cycle(key) 5 for ch in source: 6 result=result+chr(ord(ch)^ord(next(temp))) 7 return resul... 阅读全文
posted @ 2017-06-08 14:08
JustLittle
阅读(8294)
评论(0)
推荐(0)
摘要:
1 import textwrap 2 doc='''Beautiful is better than ugly. 3 Explicit is better than implicit. 4 Simple is better than complex. 5 complex is better than complicated. 6 Flat is better than dense.... 阅读全文
posted @ 2017-06-08 13:54
JustLittle
阅读(1822)
评论(0)
推荐(0)
摘要:
1 ''' 2 center()、ljust()、rjust(),返回指定宽度的新字符串,原字符串居中、左对齐或右对齐出现在新字符串中, 3 如果指定宽度大于字符串长度,则使用指定的字符(默认为空格进行填充)。 4 ''' 5 print('Hello world!'.center(20)) #居中对齐,以空格进行填充 6 # Hello world! ... 阅读全文
posted @ 2017-06-08 10:54
JustLittle
阅读(5768)
评论(0)
推荐(0)

浙公网安备 33010602011771号