2015-08-06 16:51:15 -04:00
|
|
|
Micro Python \.\+ version
|
2015-04-04 17:05:30 -04:00
|
|
|
>>> # check REPL allows to continue input
|
2015-07-23 15:05:30 -04:00
|
|
|
>>> 1 \\\\
|
2015-04-04 17:05:30 -04:00
|
|
|
... + 2
|
|
|
|
3
|
|
|
|
>>> 'abc'
|
|
|
|
'abc'
|
|
|
|
>>> "abc"
|
|
|
|
'abc'
|
|
|
|
>>> '''abc
|
|
|
|
... def'''
|
2015-07-23 15:05:30 -04:00
|
|
|
'abc\\\\ndef'
|
2015-04-04 17:05:30 -04:00
|
|
|
>>> """ABC
|
|
|
|
... DEF"""
|
2015-07-23 15:05:30 -04:00
|
|
|
'ABC\\\\nDEF'
|
2015-04-04 17:05:30 -04:00
|
|
|
>>> print(
|
|
|
|
... 1 + 2)
|
|
|
|
3
|
|
|
|
>>> l = [1,
|
|
|
|
... 2]
|
|
|
|
>>> print(l)
|
|
|
|
[1, 2]
|
|
|
|
>>> d = {1:'one',
|
|
|
|
... 2:'two'}
|
|
|
|
>>> print(d[2])
|
|
|
|
two
|
|
|
|
>>> def f(x):
|
|
|
|
... print(x)
|
|
|
|
...
|
|
|
|
>>> f(3)
|
|
|
|
3
|
|
|
|
>>>
|