1.python获取mac,ip地址2.range实现倒序列表未完待续。。 。。 。。 。。
一。文本1.每次处理一个字符 1)list 2)import sets >>> import sets &n
不支持char,byterepr 相当于反引号id(x)id(a)==id(b) <=> a is bfoostr='abcde'foostr[::-1]='edcba'foostr[::-2]='eca' //隔一个取一个############ r'\n' '\n'######
python提供三种内置的数据结构:列表 元组 字典一.列表(你可以对列表进行查,插,删,改) #!/usr/bin/python #filename:using_list.py shoplist=['apple','mango','carrot','banana'] print 'I have',len(shoplist),'items to purcha
python>>> s='tou siheoiw' >>> '%s is number %d' % (s[:6],1) 'tou si is number 1'>>> hi='''hi there''' >&g
Copyright © 2005-2024 51CTO.COM 版权所有 京ICP证060544号