0
I’m creating a function that scrambles and returns the typed word, but I don’t know how to use the print
(if this is really the case) to show the result of the function below:
def f():
a = []
x = 0
while x < len(word):
a.append(word[x])
x += 1
if x > len(word):
break
return a.sort()
word = input()
f()
'''Aqui ficaria o print. Seria algo parecido com "print(f())"? Tentei exatamente isso e a resposta foi "None".'''
First of all, it helps to know how are you studying, so that we can understand what is no longer very effective, so that we can finally diversify ideas and try to help.
– nmindz
Well, I’m preferring to study for online (free) courses, since most of Python’s books are in English. Of the subjects I have studied, I am sure I have learned only logical operators, variables, repetition structures, control structures, strings and lists. And whenever I’ve learned one of these I’ve moved on to the next, but when there are some more specific commands like the Sorted or the Random library resources that are not always introduced in online courses, or even just understand why a certain error occurred, then I begin to see my difficulties.
– Lucas Souza
I reviewed everything I thought I knew, I chose other online courses to study, and even if I want to do an exercise (like the question) I do not advance until I know everything I need to do it. I found a good book about Python Basic in Portuguese and I’m reading it, I think I’m on the right track now.
– Lucas Souza