sandz7 commited on
Commit
8a691c0
Β·
1 Parent(s): a14c9f3

used a filter instead of .join() twice

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -34,8 +34,7 @@ def output_list(output: list):
34
  Grabs the output from the first position in list,
35
  and returns it as a string as a response
36
  """
37
- text = " ".join(output)
38
- cleaned_output = ' '.join(text.split())
39
 
40
  return cleaned_output
41
 
 
34
  Grabs the output from the first position in list,
35
  and returns it as a string as a response
36
  """
37
+ cleaned_output = ' '.join(filter(None, output))
 
38
 
39
  return cleaned_output
40