Convert a Python object back into a Lisp-readable string.
(exp)
| 99 | print(lispstr(val)) |
| 100 | |
| 101 | def lispstr(exp): |
| 102 | "Convert a Python object back into a Lisp-readable string." |
| 103 | if isinstance(exp, List): |
| 104 | return '(' + ' '.join(map(lispstr, exp)) + ')' |
| 105 | else: |
| 106 | return str(exp) |
| 107 | |
| 108 | ################ eval |
| 109 |