作者:一线天24_226 | 来源:互联网 | 2023-08-20 14:14
还是基于上篇提到的自动回贴的需求,通过抓包可以获取需要post的登录信息,实现登录,之后就要通过Python实现自动回贴,但是之前没有用过python,为了一个功能要系
还是基于上篇提到的自动回贴的需求,通过抓包可以获取需要post的登录信息,实现登录,之后就要通过Python实现自动回贴,
但是之前没有用过python,为了一个功能要系统的学习一门语言必然浪费很多时间,所以就要速成,根据其他语言基础快速做迁移。
以下便是概要,简单了解基本用法,为接下来的开发做基础。
[python] view plain copy print?
-
-
-
-
-
-
-
- print 'hello','world'
-
-
- name = raw_input();
- print 'hello,',name
-
-
- name=raw_input('please enter your name:');
- print 'hello',name
-
-
- birth = int(raw_input('birth:'))
-
-
-
-
-
-
- print '\\\n\\'
-
-
- print r'\\\n\\'
-
-
- print ''
-
-
-
-
- print 3>2
-
-
- print u'ABC'.encode('utf-8')
- print u'中文'.encode('utf-8')
-
-
-
-
-
-
-
-
-
-
-
- print 'Hello,%s' % 'world'
-
-
- print '%2d-%02d' %(3,1)
- print '%.2f' %3.1415926
-
-
- print '%s-0%s' %(3,1)
- print '%s' %3.1415926
-
-
- print u'Hi,%s' % u'Jason0539'
-
-
- print 'growth rate:%d%%' %7
-
-
-
-
-
-
- classmates = ['Jack','Bob','Tracy']
- print classmates
-
-
- print len(classmates)
-
-
- print classmates[2]
-
-
- print classmates[-1]
-
-
- classmates.append('Adam')
- print classmates
-
-
- classmates.insert(0,'Jason0539')
- print classmates
-
-
- print classmates.pop()
-
-
- print classmates.pop(0)
- print classmates
-
-
- classmates[0]='Jason0539'
- print classmates
-
-
- s = ['python','java',['asp','jsp'],'scheme']
- print s[2][1]
-
-
- l=[]
- print len(l)
-
-
-
-
-
-
-
- classmates=('Michael','Bob','Tracy')
- print classmates
-
- classmates=()
- print classmates
-
- t=(1,)
- print t
-
-
-
-
- t=('a','b',['A','B'])
- print t
- t[2][0]='X'
- t[2][1]='Y'
- print t
-
-
-
-
-
-
-
- d={'Michael':95,'Bob':75,'Tracy':85}
- print d['Michael']
-
-
- d['Jason']=5390
- print d
-
-
-
- print 'Jason' in d
-
-
- print d.get('Thomas')
- print d.get('Thomas',-1)
-
-
- d.pop('Jason')
- print d
-
-
-
-
-
-
- s = set([1,2,3])
- print s
-
-
- s = set([1,2,3,2,3,2,4])
- print s
-
-
- s.add(4)
- print s
-
-
- s.remove(4)
- print s
-
-
- s = 5 in s
- print s
-
-
- s1=set([1,2,3])
- s2=set([2,3,4])
- print s1 & s2
- print s1 |s2
-
-
-
-
-
- s = "jason0539"
- s.isalnum()
- s.isalpha()
- s.isdigit()
- s.islower()
- s.isupper()
- s.istitle()
- s.isspace()
-
-
- s.upper()
- s.lower()
- s.capitalize()
- s.title()
作者:jason0539
博客:http://blog.csdn.net/jason0539(转载请说明出处)