def code_morse(text):
m_letters = []
count = 0
need_sleep = count / 20
for char in text.lower():
count += 1
if char in morse:
m_letters.append(morse[char])
else:
m_letters.append('?')
time.sleep(need_sleep)
m_text = '/'.join(m_letters) # эту переменную надо вывести в консоль в app.py
import cstxt
need = 'тест'
translate = cstxt.code_morse(need)