pystr_maketrans: Create a character map.

Description Usage Arguments Details Value References See Also Examples

Description

Create a list of character mappings usable for pystr_translate.

Usage

1

Arguments

x

A string.

y

A string.

Details

The two arguments must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y.

Value

A list of character mappings for use in pystr_translate.

References

https://docs.python.org/3/library/stdtypes.html#str.maketrans

See Also

pystr_translate

Examples

1
2
map = pystr_maketrans("abc", "123")
pystr_translate("a blue cat", map)

pystr documentation built on April 15, 2017, 12:30 a.m.

Related to pystr_maketrans in pystr...