0
How can i save an output of a for loop?
import random import string #variables a = string.ascii_lowercase result = [] TranslatedText = str(input("Enter the text you want to translate: ")) print(TranslatedText) for i in range(2): x = print(random.choice(a)) result.append(str(x)) print(result) output is ["None", "None"] i want the output to be the 2 random letters from the loop but idk how to do that.
1 Odpowiedź
+ 1
You can see the corrected code. Hope it helps you.
https://code.sololearn.com/cIhmT1kEljeL/?ref=app