2015-10-12 00:06:25 +01:00
|
|
|
|
MicroPython \.\+ version
|
2015-10-12 00:19:00 +01:00
|
|
|
|
Use \.\+
|
2015-04-04 22:05:30 +01:00
|
|
|
|
>>> # check REPL allows to continue input
|
2015-07-23 20:05:30 +01:00
|
|
|
|
>>> 1 \\\\
|
2015-04-04 22:05:30 +01:00
|
|
|
|
... + 2
|
|
|
|
|
3
|
2015-09-18 18:46:05 +01:00
|
|
|
|
>>> '"'
|
|
|
|
|
'"'
|
|
|
|
|
>>> "'"
|
|
|
|
|
"'"
|
|
|
|
|
>>> '\\\\''
|
|
|
|
|
"'"
|
|
|
|
|
>>> "\\\\""
|
|
|
|
|
'"'
|
|
|
|
|
>>> '\\\\'('
|
|
|
|
|
"'("
|
|
|
|
|
>>> "\\\\"("
|
|
|
|
|
'"('
|
|
|
|
|
>>> print("\\\\"(")
|
|
|
|
|
"(
|
|
|
|
|
>>> print('\\\\'(')
|
|
|
|
|
'(
|
|
|
|
|
>>> print("\\\\'(")
|
|
|
|
|
'(
|
|
|
|
|
>>> print('\\\\"(')
|
|
|
|
|
"(
|
2015-04-04 22:05:30 +01:00
|
|
|
|
>>> 'abc'
|
|
|
|
|
'abc'
|
|
|
|
|
>>> "abc"
|
|
|
|
|
'abc'
|
|
|
|
|
>>> '''abc
|
|
|
|
|
... def'''
|
2015-07-23 20:05:30 +01:00
|
|
|
|
'abc\\\\ndef'
|
2015-04-04 22:05:30 +01:00
|
|
|
|
>>> """ABC
|
|
|
|
|
... DEF"""
|
2015-07-23 20:05:30 +01:00
|
|
|
|
'ABC\\\\nDEF'
|
2015-04-04 22:05:30 +01: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 10:34:22 +01:00
|
|
|
|
... print(x)
|
|
|
|
|
... [K
|
2015-04-04 22:05:30 +01:00
|
|
|
|
>>> f(3)
|
|
|
|
|
3
|
|
|
|
|
>>>
|