数据分离逐步封装,差进行数据到逻辑的一层,后继补充
This commit is contained in:
14
04-CustomLibrary/Custometest/Common.py
Normal file
14
04-CustomLibrary/Custometest/Common.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import json
|
||||
|
||||
#判断一个字符或字符串是否包含于另一个字符串:a是否再b中,是否则返回True,否则返回Falsle
|
||||
def aisincludeb(a,b):
|
||||
result = a in b
|
||||
print(result)
|
||||
return result
|
||||
|
||||
#删除字符串当前前几个,或后几个:sourcestr源串,a[2:-2] 表示去掉前面两个和后面两个,如果光去掉后面的a[:-2]
|
||||
def removeBeforOrAfter(sourcestr,a):
|
||||
#a = "16541616584984"
|
||||
#a = a[2:-2]
|
||||
sourcestr = sourcestr[a]
|
||||
return result
|
||||
Reference in New Issue
Block a user