I'm writing a program that needs to read a string from the user and create 2 lists of words from the input. One with the words that contain at least one upper-case letter and one of the words that don't contain any upper-case letters. Use a single for loop to print out the words with upper-case letters in them, followed by the words with no upper-case letters in them, one word per line.
So far I've got this:
"""Simple program to list the words of a string."""
s = input("Enter your string: ")
words = s.strip().split()
for word in words:
print(word)
words = sorted([i for i in words if i[0].isupper()]) + sorted([i for i in words if i[0].islower()])enter code here
problem is I don't know how to get it to split into 2 separate lists (with the conditions listed for each list). Any help is appreciated