-2

Using python code, how can you paste a string to a user input?

I would like to edit a text, where you have a line, and the user input already has the line pasted on it by the program, like:

line = 'hello there'

input('')

Then, when you execute the program, 'hello there' is in your input and you can edit it into other words

Domzymonz
  • 13
  • 1
  • 6
  • 1
    Does this answer your question? [Show default value for editing on Python input possible?](https://stackoverflow.com/questions/2533120/show-default-value-for-editing-on-python-input-possible) – Marko Borković Aug 14 '20 at 07:38
  • Please show some actual code. – Jan Aug 14 '20 at 07:41

1 Answers1

0

Like This?

default_str = "Hello There"
user_input = default_str + input("{}".format(default_str))
TheLazyScripter
  • 2,541
  • 1
  • 10
  • 19