forked from Kikkomanq/Auto1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
helpers.py
43 lines (29 loc) · 868 Bytes
/
helpers.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
37
38
39
40
import random
class HelpLib():
def return_years_only(self, dateList):
yearsOnly = []
trueYears = []
for a in dateList:
yearsOnly.append(a[5:])
for n in yearsOnly:
trueYears.append(float(n))
return trueYears
def return_price_only(self, priceAll):
priceList = []
new_numbers = []
for a in priceAll:
priceList.append(a[ :-3])
for n in priceList:
new_numbers.append(float(n))
return new_numbers
def registration(self, trueYears):
for i in trueYears:
if i > 2014 :
return True
else:
return False
def sorted_List(self, price):
if (price[::-1] == sorted(price)):
return True
else:
return False