ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 01 Aug 2011 08:09:57 -0500Assigning variable values in a programhttp://ask.sagemath.org/question/8253/assigning-variable-values-in-a-program/For a cryptography application, I want to assigned values of 0 or 1 to the following variables (x0, x1, x2, ..., x128). I want to define a function to take a hexadecimal representation of the 128 bits and assigned a 0 or 1 to each variable.
This can easily be done manually in sage by simply stating: <br>
**sage:** x0 = 0<br>
**sage:** x1 = 1 # and so on.<br>
But I'm having finding a way to include this type of variable assignment in a function. I can do it by writting to a file and loading the file in Sage, but that required manual intervention to load the file.
Sorry if this is a trivial question, but I couldn't find an answer in the documentation
Thanks!
sagenewbieMon, 01 Aug 2011 08:09:57 -0500http://ask.sagemath.org/question/8253/