2015-10-11 19:06:25 -04:00
|
|
|
|
MicroPython \.\+ version
|
2015-10-11 19:19:00 -04:00
|
|
|
|
Use \.\+
|
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
|
2016-02-16 08:36:18 -05:00
|
|
|
|
>>> if1=1
|
|
|
|
|
>>> if1 = 2
|
|
|
|
|
>>> print(if1)
|
|
|
|
|
2
|
2015-04-04 17:05:30 -04:00
|
|
|
|
>>>
|