-
Notifications
You must be signed in to change notification settings - Fork 0
/
pydtk.py
36 lines (31 loc) · 768 Bytes
/
pydtk.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import is_in
def that_in(trigger, to_verify):
if type(trigger) is str:
if is_in.str(trigger, to_verify):
return True
else:
return False
else:
if is_in.str(trigger, to_verify):
if is_in.array(trigger, to_verify):
return True
else:
return False
def media(values):
final = 0
for value in values:
final += value
return final / len(values)
def explode(string):
final = string.split()
return final
def array_diff(array1, array2):
final_list = []
for i in array1:
for a in array2:
if i != a:
final_list.append(i)
def implode(array):
str = ""
for i in array:
str.join(i)