Rust
println!("Type something")
let mut line = String:new();
std::io::stdin.read_line(&mut line)
Python
line = input("Type something")
Rust
let x = 5
println!("Variable x equals to {x}")
Python
x = 5
print(f"Variable x equals to {x}")
Rust
use rand::Rnd;
let n = rand::thread_rng().gen_range(0..10)
Python
import random
n = random.randint(0, 10)
Rust
let my_str = ""1024".to_string();
let my_int: i32 = my_string.parse();
Python
x = "1024"
i = int(x)
Rust
sys::process.exit(255)
Python
import sys
sys.exit(255)
Rust
let args = std::env::args();
Python
import sys
args = sys.argv