Python input function rewritten in rust
⚓ Rust 📅 2025-09-14 👤 surdeus 👁️ 12I saw this, and i decided to recreate it without looking at source code. I started rust today because i wanted to learn lower level languages unlike my python, lua, html css and javascript knowledge.
pub fn input(string:&str)->String{
println!("{}",string);
let mut line:String=String::new();
line.clear();
std::io::stdin()
.read_line(&mut line).unwrap();
return line;
}
1 post - 1 participant
🏷️ Rust_feed