Uber Interview Question

Write a function that can break a large SMS message string given a length limit per substring. Words must stay together. If a word is longer than the limit, use the word in a new substring and split it as relevant. def sms_messages(sms_text_str, limit_int): return split_messages_list Example input: "Joe is the funniest guy", 6 Example output: ["Joe is", "the", "funnie", "st guy"]