0

I am looking for a function that would write a string onto where the user would usually input a string. I am trying to make a program that would loop through an array of strings and the user would be able to quickly fix spelling mistakes without needing to type out the word each time.

name_array = ["Sam", "Willie", "Ryan"]

for i in range(len(name_array)):
    name_array[i] = input("Correct Name:")

Correct Name: Sam
              ^^^ I want this to automatically be written for the user. 
  • 1
    does this answer your question: https://stackoverflow.com/questions/8505163/is-it-possible-to-prefill-a-input-in-python-3s-command-line-interface – Raphael Mar 10 '22 at 18:55
  • 1
    Does this answer your question? [Is it possible to prefill a input() in Python 3's Command Line Interface?](https://stackoverflow.com/questions/8505163/is-it-possible-to-prefill-a-input-in-python-3s-command-line-interface) – Michael Butscher Mar 10 '22 at 19:02

0 Answers0