Print formatted string
Rust
#![allow(unused)]
fn main() {
let x = 5
println!("Variable x equals to {}", x)
}
Python
x = 5
print(f"Variable x equals to {x}")
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
#![allow(unused)]
fn main() {
let x = 5
println!("Variable x equals to {}", x)
}
x = 5
print(f"Variable x equals to {x}")