Skip to content

Instantly share code, notes, and snippets.

@accessnash
Created October 19, 2015 07:22
Show Gist options
  • Save accessnash/c6930ff526511b1f11b0 to your computer and use it in GitHub Desktop.
Save accessnash/c6930ff526511b1f11b0 to your computer and use it in GitHub Desktop.
lst_UC = []
lst_LC = []
s = input("Enter your text: ")
words = s.strip().split()
for word in words:
if not word.islower():
lst_UC.append(word)
else:
lst_LC.append(word)
final_lst = lst_UC + lst_LC
for x in final_lst:
print(x)
# print("List with upper case words: ", lst_UC, "List with lower case words: ", lst_LC)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment