Answers for "python run javascript"

0

python run javascript

import js2py

js = """
function escramble_758(){
var a,b,c
a='+1 '
b='84-'
a+='425-'
b+='7450'
c='9'
document.write(a+c+b)
}
escramble_758()
""".replace("document.write", "return ")

result = js2py.eval_js(js)  # executing JavaScript and converting the result to python string
Posted by: Guest on July-13-2020
0

python run javascript

class Solution:
    def solve(self, s):
        x = ""
        for i in s:
            if i >= 'a' and i <= 'z':
                x += i
        i, j = 0, len(x) - 1
        while i <= j:
            if x[i] != x[j]:
                return False
            i += 1
            j -= 1
        return True
Posted by: Guest on September-26-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language