Oct-04-2019, 07:37 PM
Sorry, I asked the wrong question on my earlier post Earlier Post. When I run this, I'm getting
018
002
024
200
005
How can I get this?
[018,002,024,200,005]
018
002
024
200
005
def convert_ceiling(text):
split = text.split()
for s in split:
if 'FEW' in s or 'OVC' in s or 'BKN' in s or 'SCT' in s:
ceiling = s.replace('FEW','').replace('OVC','').replace('BKN','').replace('SCT','')
print(ceiling) # <------ NEED TO CHANGE THIS TO AN LIST
ceiling = int(ceiling) * 100
#print(ceiling)
#array = [ceiling]
#return array
#array.sort()
#return (array[0])How can I change that to a list so I can sort it?How can I get this?
[018,002,024,200,005]
