Category: Python&Rust
-
Exploring Dict and HashMap in Python and Rust

Learn Python with Rust: Counting String Occurrences Let’s learn Python by looking at another language, Rust. Here is a Python pedagogical simplistic example that counts string occurrences in a list (could be done using Counter, I know), and the Rust counterpart (I know, could be done using into_iter and fold). Data Structures: Dict and HashMap…