D
D
DimaD0106d2021-06-14 20:17:25
Python
DimaD0106d, 2021-06-14 20:17:25

How to make numbers generated in notepad?

I have this algorithm:


import random
import time
while True:
    time.sleep(0.10)
    for i in range(8):
        a = random.randint(1,9)
        print(a, end = '')
    print()


Numbers are made in the command line, how to make them become in notepad ??

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ronald McDonald, 2021-06-14
@Zoominger

Write them to a file with the extension txt.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question