How to return multiple values each in a new line!
hello everyone, I need your advise on how to return multiple values from a function and print the output one by one in new line.. def sortString(mystring): upper = "" lower = "" punch = "" spacecount = 0 try: for i in mystring: if ord(i) in range(65, 91): upper += i elif ord(i) in range(97,123): lower += i elif ord(i) in range(33, 65): punch += i elif ord(i) == 32: spacecount += 1 return upper \n lower \n punch \n spacecount except: return "Not a string!" print(sortString("ZOMG Hello, CS1301!!")) My code should print as follows; #ZOMGHCS #ello #,1301!! #2 Any thoughts?