|
发表于 2019-2-20 00:04:16
|
显示全部楼层
<C:\Users\10601>python -m timeit -s 'text = "I love FishC.com!"; char = "o"' 'char in text'
Traceback (most recent call last):
File "C:\Python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python37\lib\timeit.py", line 374, in <module>
sys.exit(main())
File "C:\Python37\lib\timeit.py", line 313, in main
t = Timer(stmt, setup, timer)
File "C:\Python37\lib\timeit.py", line 109, in __init__
compile(setup, dummy_src_name, "exec")
File "<timeit-src>", line 1
'text
^
SyntaxError: EOL while scanning string literal>
为什么我用cmd 有的会出错
|
|