Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
23

How to make an input create a variable

Ferris
Ferris

I want to be able to create new variables without having to go into the code is there any way to do this

3 years ago
You are viewing a single comment. View All
1
AlexanderBirabe
AlexanderBirabe

Considering your profile says you code in python, I think you're looking for:

variableName = input("prompt")

The variable 'variableName' gets set to a string of what the user types in (they have to hit enter to submit). You can replace 'prompt' with whatever you want the input prompt to be.

3 years ago