testlist.py 874 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # coding:utf-8
  2. from decimal import Decimal
  3. __author__ = 'Xaxdus'
  4. # list = ["www.baidu.com/%s" %m for m in ['index']+range(1,5)]
  5. #
  6. # list = [(1,10)]*10
  7. #
  8. # for m,n in list:
  9. # print m,n
  10. #
  11. #
  12. # list2 = ["www.baidu.com/%s/%s"%(i[0],i[1]) for i in list]
  13. # print list2
  14. # x=Decimal('0.998531571219').quantize(Decimal('0.00'))
  15. # a= 0.998531571219
  16. # value = round(a, 3)
  17. # print x,type(x),value
  18. # proxys=[]
  19. # proxy=[123,1234]
  20. # proxys.append(proxy)
  21. #
  22. # proxy=[123,1234]
  23. # proxys.append(proxy)
  24. #
  25. # print proxys
  26. # l = [{'ip':'123.1.1.1','port':80},{'ip':'123.1.1.1','port':80},{'ip':'123.1.2.1','port':80},{'ip':'123.1.1.1','port':81}]
  27. #
  28. # # for d in l:
  29. # # print [tuple(d.items())]
  30. # print [tuple(d.items()) for d in l]
  31. #
  32. # print [dict(t) for t in set([tuple(d.items()) for d in l])]
  33. import requests
  34. r = requests.get('http://127.0.0.1:8000/delete?ip=120.92.3.127')
  35. print
  36. r.text