Vertical Print String - Python3.2
问题 I'm writing a script that will take as user inputed string, and print it vertically, like so: input = "John walked to the store" output = J w t t s o a o h t h l e o n k r e e d I've written most of the code, which is as follows: import sys def verticalPrint(astring): wordList = astring.split(" ") wordAmount = len(wordList) maxLen = 0 for i in range (wordAmount): length = len(wordList[i]) if length >= maxLen: maxLen = length ### makes all words the same length to avoid range errors ### for i