1
Well, I’m doing a program that takes the spaces of sentences, letters, words, and puts each "phrase/letter/word" under each other.
For example: A "phrase/letter/word": BAB BBA ACA AAB BCB CBB ABC CBC BBB ACA BCB CBA CBA CCB ACB BAA BBC ACB BCB
It removes the spaces, and puts one underneath the other. I’ll leave a print, showing, to make it easier.
My source code
string_qualquer = input("Digite o texto: ")
for x in string_qualquer.split():
print(x)
How do I save the result, instead of just printing on the screen?
Programme under implementation:
It worked fine buddy, thanks! The excerpt "with open("result.txt", "w") as stream:" is a file-opening mode, right? Another question, do you have in python’s Ocs explaining this type of file opening? Because I use that conventional one. Ex: "File = open("qualquername.txt", "w")".
– BRKappa
@Brkappa in a way, yes. Read more on: https://answall.com/q/49238/5878
– Woss
Thank you for having solved my doubts!!!
– BRKappa