原创 Python - 不固定參數函數的定義,四種參數傳遞方法總結

1.不固定參數函數的定義: def foo(*args): print args foo(1,2) 返回:(1,2) 2.def fo

原创 Python 基礎學習7 - print line

 Python的print line的特別之處是默認會打印換行符: e.g f = open("Test.txt") for fline in f: print fline 返回: This is line1 This i

原创 Python - map, reduce 練習

map(func,seq), 將序列seq中的元素取出來,依次放到Func函數,將結果以列表形式返回,支持多參數e.g a = [1,2,3,4] def add(x): return x+3 listmap = map(ad

原创 跨平臺GUI - 自動化測試工具

1.https://www.froglogic.com/squish/editions/mac/ 看起來是收費的,看描述很強大啊,支持跨平臺 2.https://pyautogui.readthedocs.io Pyautogui,支持跨

原创 Android testing - How to install adb on Windows / Mac

 Windows Download & Install Android SDK https://developer.android.com/sdk/index.html#Other Configure: https://develop

原创 面試必備-快速排序(Java)

以s[l]爲基準,從右向左比較,找到比它小的就放到s[i] 從左向右比較,找到比它大的就放到s[j], 當i==j時,退出循環,s[i]=x 時間複雜度是nlogn public class quickSort { static vo

原创 Python unittest 測試框架學習筆記

https://docs.python.org/2.7/library/unittest.html  點贊 收藏 分享 文章舉報 蓉兒Sharon 發佈了43 篇原創文章

原创 用virtualenv建立多個Python獨立開發環境

整理自: http://www.nowamagic.net/academy/detail/1330228 什麼是virtualenv? 在Python的開發環境的最常用的方法是使用 virtualenv 包。 Virtualenv是一

原创 Python - 標準庫的使用方法

 https://docs.python.org/2/library/,收藏 點贊 收藏 分享 文章舉報

原创 Python eval() 和 exec()函數

exec()這個函數專門用來執行字符串或文件裏面的python語句, eval()是把字符串中符合Python表達式的東西計算出來 print eval("3+5") exec "print 'Hello, Python'" 返回: 8

原创 Python - 私有方法,專有方法

Python的私有方法:以'__'雙劃線開頭,但不以雙劃線結尾, __privateMethod 專有方法:以雙劃線開頭和結尾, __init__ e.g class Person: def __init__(self,name)

原创 Python基礎學習筆記5 tuple,set

1. tuple是一種序列類型的數據,和list,str很類似,它的特點是其中的元素不能更改,元素可以是任何類型(list類似) 2. tuple和list的相互轉化:分別用list(), tuple()就可以相互轉換 listA = [

原创 Android - how to install a new version of the apk 如何安裝apk新版本

 The following steps assume you have adb set up and ready to go: adb remountadb shell rm /system/priv-app/ABLauncher.

原创 Python - 實用的內置函數zip

zip是什麼?zip(...)     zip(seq1 [, seq2 [...]]) -> [(seq1[0], seq2[0] ...), (...)]         Return a list of tuples, where

原创 Python - 練習 判斷輸入是奇數,偶數,小數,還是字符

#coding:utf-8 ''' 下面就做一個練習, 要求是: 1. 接收任何字符和數字的輸入 2. 判斷輸入的內容, 如果不是整數是字符, 就告訴給用戶;如果是小數, 也告訴用戶 3. 如果輸入的是整數, 判斷這個整數是奇數還是偶數,