It’s very simple:
>>> import codecs
>>> codecs.encode('foobar', 'rot_13')
'sbbone'
More Related Contents:
- How to detect string byte encoding?
- How do I concatenate items in a list to a single string?
- Check if multiple strings exist in another string
- Changing default encoding of Python?
- Fast punctuation removal with pandas
- Converting integer to string in Python
- Checking whether a string starts with XXXX
- Find the nth occurrence of substring in a string
- Stripping non printable characters from a string in python
- Character reading from file in Python
- How can I check if character in a string is a letter? (Python)
- How can I convert each item in the list to string, for the purpose of joining them? [duplicate]
- rreplace – How to replace the last occurrence of an expression in a string?
- Convert integer to string in Python
- How to remove square bracket from pandas dataframe
- subprocess “TypeError: a bytes-like object is required, not ‘str'”
- How to handle response encoding from urllib.request.urlopen() , to avoid TypeError: can’t use a string pattern on a bytes-like object
- How does the max() function work on list of strings in python?
- Removing control characters from a string in python
- Converting a string that represents a list, into an actual list object
- How to search if dictionary value contains certain string with Python
- How to concatenate (join) items in a list to a single string
- How do I wrap a string in a file in Python?
- How can I use f-string with a variable, not with a string literal?
- Using Python’s Format Specification Mini-Language to align floats
- f.read coming up empty
- How can I check if a string has a numeric value in it in Python? [duplicate]
- Python string operation, extract text between html tags
- get python dictionary from string containing key value pairs
- Detect whether a Python string is a number or a letter [duplicate]