Char in Rust
String in Python
Since the
strclass is immutable in Python, no method of thestrclass is in-place. Instead, all methods of thestrclass returns a new copy of string.\needs to be escaped (i.e., use\\) in triple quotes.
The in Operator¶
There is no method named contains in the str class.
You can either use the in