Every line of 'python maketrans' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
174 def maketrans(fromstr, tostr): 175 global _idmapL 176 if len(fromstr) != len(tostr): 177 raise ValueError, 'maketrans arguments must have same length' 178 if not _idmapL: 179 _idmapL = list(_idmap) 180 L = _idmapL[:] 181 fromstr = map(ord, fromstr) 182 for i in range(len(fromstr)): 183 L[fromstr[i]] = tostr[i] 184 185 return join(L, '')
Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code
60 def maketrans(frm, to): 61 return ''