Char in Rust
String in Python
Since the
str
class is immutable in Python, no method of thestr
class is in-place. Instead, all methods of thestr
class 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