File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5656
5757m = re .search ("w.r" , "hello world" )
5858print (m .group (0 ))
59+
60+ m = re .match ('a+?' , 'ab' ); print (m .group (0 ))
61+ m = re .match ('a*?' , 'ab' ); print (m .group (0 ))
62+ m = re .match ('^ab$' , 'ab' ); print (m .group (0 ))
63+ m = re .match ('a|b' , 'b' ); print (m .group (0 ))
64+ m = re .match ('a|b|c' , 'c' ); print (m .group (0 ))
Original file line number Diff line number Diff line change 1313# unary ops
1414print (bool (1j ))
1515print (+ (1j ))
16- # print(-(1j)) uPy doesn't print correctly
16+ print (- (1 + 2j ))
1717
1818# binary ops
1919print (1j + 2 )
2323print (1j * 2 )
2424print (1j * 2j )
2525print (1j / 2 )
26- # print(1j / 2j) uPy doesn't print correctly
27- #print( 1j ** 2) uPy doesn't print correctly
28- #print( 1j ** 2j) uPy doesn't print correctly
26+ print (1j / ( 1 + 2j ))
27+ ans = 1j ** 2.5 ; print ( "%.5g %.5g" % ( ans . real , ans . imag ))
28+ ans = 1j ** 2.5j ; print ( "%.5g %.5g" % ( ans . real , ans . imag ))
2929
3030# builtin abs
3131print (abs (1j ))
32- print (abs (1j + 2 ))
32+ print ("%.5g" % abs (1j + 2 ))
You can’t perform that action at this time.
0 commit comments