Crates.io | python-input |
lib.rs | python-input |
version | 0.8.0 |
source | src |
created_at | 2020-01-13 01:27:12.183413 |
updated_at | 2020-01-13 01:51:12.333262 |
description | A rust implementation of the python 'input' function. |
homepage | |
repository | https://github.com/maxslarsson/python-input |
max_upload_size | |
id | 197965 |
size | 3,844 |
A simple pure-rust implementation of python's input function.
There is currently only one function, the input
function.
The input function takes one parameter, a string which is printed to the console as a prompt to the user.
Cargo.toml
file[dependencies]
...
python-input = "0.8.0"
...
extern crate python_input;
use python_input::input;
fn main() {
let name = input("What is your name? ");
let age = input("How old are you? ");
println!("Hello {}, you are {} years old.", name, age);
}