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
|
2015-09-18 13:46:05 -04:00
|
|
|
|
>>> '"'
|
|
|
|
|
'"'
|
|
|
|
|
>>> "'"
|
|
|
|
|
"'"
|
|
|
|
|
>>> '\\\\''
|
|
|
|
|
"'"
|
|
|
|
|
>>> "\\\\""
|
|
|
|
|
'"'
|
|
|
|
|
>>> '\\\\'('
|
|
|
|
|
"'("
|
|
|
|
|
>>> "\\\\"("
|
|
|
|
|
'"('
|
|
|
|
|
>>> print("\\\\"(")
|
|
|
|
|
"(
|
|
|
|
|
>>> print('\\\\'(')
|
|
|
|
|
'(
|
|
|
|
|
>>> print("\\\\'(")
|
|
|
|
|
'(
|
|
|
|
|
>>> print('\\\\"(')
|
|
|
|
|
"(
|
2015-04-04 17:05:30 -04:00
|
|
|
|
>>> '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):
|
2015-08-20 05:34:22 -04:00
|
|
|
|
... print(x)
|
|
|
|
|
... [K
|
2015-04-04 17:05:30 -04:00
|
|
|
|
>>> f(3)
|
|
|
|
|
3
|
|
|
|
|
>>>
|