12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- Module(body=[Assign(targets=[Name(id='correct',
- ctx=Store())],
- value=Name(id='True',
- ctx=Load())),
- For(target=Name(id='x',
- ctx=Store()),
- iter=Call(func=Name(id='range',
- ctx=Load()),
- args=[Num(n=256)],
- keywords=[],
- starargs=None,
- kwargs=None),
- body=[If(test=Compare(left=Name(id='x',
- ctx=Load()),
- ops=[NotEq()],
- comparators=[Call(func=Name(id='ord',
- ctx=Load()),
- args=[Call(func=Name(id='chr',
- ctx=Load()),
- args=[Name(id='x',
- ctx=Load())],
- keywords=[],
- starargs=None,
- kwargs=None)],
- keywords=[],
- starargs=None,
- kwargs=None)]),
- body=[Print(dest=None,
- values=[Name(id='x',
- ctx=Load())],
- nl=True),
- Assign(targets=[Name(id='correct',
- ctx=Store())],
- value=Name(id='False',
- ctx=Load()))],
- orelse=[])],
- orelse=[]),
- Print(dest=None,
- values=[Str(s='chr and ord are inverses: '),
- Name(id='correct',
- ctx=Load())],
- nl=True),
- Print(dest=None,
- values=[Str(s="ord('a') = "),
- Call(func=Name(id='ord',
- ctx=Load()),
- args=[Str(s='a')],
- keywords=[],
- starargs=None,
- kwargs=None)],
- nl=True),
- Print(dest=None,
- values=[Compare(left=Call(func=Name(id='ord',
- ctx=Load()),
- args=[Str(s='a')],
- keywords=[],
- starargs=None,
- kwargs=None),
- ops=[Eq()],
- comparators=[Num(n=97)])],
- nl=True)])
|