This crate will make writing inputs in Rust alot easier as Python.
use io_capitalize::*;
// Import the crate to use.
fn main() {
let mut ask = input_str("How are you? ).to_lowercase;
if ask.contains(good) || ask.contains(nice) || ask.contains(cool) {
ask = "good".to_string();
// If you want to reassign your muttable variable, you must convert it to String. (&str aren't compatible.)
print!("{}? Nice.", ask.capitalize());
}
else {
print!("OH!");
}
// See how much simple it is? Also it works with other types by: (input_int) both i64 and i32, (input_float) both f64 and f32, (input_bool) for booleans.
// And the capitalize method is integrated, it is a Python equivalent of .capitalize() string method, useful to have though.
}