Keyboard shortcuts

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

Join path

Rust

#![allow(unused)]
fn main() {
use std::path::PathBuf;

let path = PathBuf::from("home")
    .join("user")
    .join("file.txt");
}

Python

import os

path = os.path.join("home", "user", "file.txt")