摘要:
1,变编译时字符串连接,第一种是正常(‘\’),第二种是不成用的。s1="hello world \ !!!" print 's1: ',s1s2="hello world" "!" "!!! " ' I love you' print 's2: ',s2 s1: hello world !!!s2: hello world!!!! I love you2 字符串模板1 from string import Template2 s=Template('I am 阅读全文
摘要:
废话不多说 直接上代码:s=iter('12345')print 's.next(): ', s.next()print 'type(s.next()):' , type(s.next())print 's.next(): ', s.next()print 'type(s):' , type(s)dic ={ 'a':'c','b':'c'}d=iter(dic)print 'dic= ',dicprint 'type(d): 阅读全文