Create a function `longer` that accepts a string and sorts the words in it based on their respective lengths in an ascending order. If there are two words of the same lengths, sort them alphabetically. Look at the examples below for more details.

```python
longer("Another Green World") => Green World Another
longer("Darkness on the edge of Town") => of on the Town edge Darkness
longer("Have you ever Seen the Rain") => the you Have Rain Seen ever
```

Assume that only only Alphabets will be entered as the input.
Uppercase characters have priority over lowercase characters. That is,
```python
longer("hello Hello") => Hello hello
```

Don't forget to rate this kata and leave your feedback!! 
Thanks

Difficulty: introductory

Starter code:

def longer(s):
	

Solutions:
def longer(s):
    return ' '.join(sorted(s.split(), key=lambda w: (len(w), w)) )

def longer(s):
    return ' '.join(sorted(s.split(' '),key = lambda x: (len(x),x)))

def longer(s):
    return ' '.join(sorted(s.split(), key=lambda item: (len(item), item)))

def longer(s): #or    longer = lambda s:   if you're more daring :D
    return " ".join(sorted(s.split(" "),key=lambda x:(len(x),x)))

def longer(strng):
    def length_string(s):
        return len(s)
    initial_list = sorted(strng.split())
    result = " ".join(sorted(initial_list, key = length_string))
    return result

def longer(s):
    return ' '.join(sorted(sorted(s.split(' ')), key=len))

longer = lambda s: " ".join(sorted(s.split(" "),key=lambda x:(len(x),x)))

# Why not both? :)

def longer(s):
    return " ".join(sorted(list(s.split()), key=lambda x: (len(x), x)))
    
longer = lambda s: " ".join(sorted(list(s.split()), key=lambda x: (len(x), x)))    

def longer(s):
    words = s.split(' ')
    return ' '.join(sorted(words, key = lambda x: (len(x),x)))

def longer(sentence):
    def conditional(word):
        return len(word), word
    words = sentence.split(" ")
    words = sorted(words, key=conditional)
    return ' '.join(words)