Redis lua scripting - What is the python equivalent of the lua script written in Ruby?
I do not know ruby but I know python.  What is the python equivalent for running the below code?  This example was taken from the redis website.  So, what is that <<EOF?

would it be in python:

      RandomPushScript = """
        Lua code here
       """


    RandomPushScript = <<EOF
        local i = tonumber(ARGV[1])
        local res
        math.randomseed(tonumber(ARGV[2]))
        while (i > 0) do
            res = redis.call('lpush',KEYS[1],math.random())
            i = i-1
        end
        return res
    EOF
    
    r.del(:mylist)
    puts r.eval(RandomPushScript,1,:mylist,10,rand(2**32))
Redis lua scripting - What is the python equivalent of the lua script written in Ruby?
===

I do not know ruby but I know python.  What is the python equivalent for running the below code?  This example was taken from the redis website.  So, what is that <<EOF?

would it be in python:

      RandomPushScript = """
        Lua code here
       """


    RandomPushScript = <<EOF
        local i = tonumber(ARGV[1])
        local res
        math.randomseed(tonumber(ARGV[2]))
        while (i > 0) do
            res = redis.call('lpush',KEYS[1],math.random())
            i = i-1
        end
        return res
    EOF
    
    r.del(:mylist)
    puts r.eval(RandomPushScript,1,:mylist,10,rand(2**32))