【判断题】
扩展库os中的方法remove()可以删除带有只读属性的文件。
查看试卷,进入试卷练习
微信扫一扫,开始刷题
相关试题
【判断题】
使用内置函数open()且以”w”模式打开的文件,文件指针默认指向文件尾。
【判断题】
使用内置函数open()打开文件时,只要文件路径正确就总是可以正确打开的。
【判断题】
Python变量使用前必须先声明,并且一旦声明就不能再当前作用域内改变其类型。
【判断题】
Python采用的是基于值得自动内存管理方式。
【判断题】
在任何时刻相同的值在内存中都只保留一份
【判断题】
Python不允许使用关键字作为变量名,允许使用内置函数名作为变量名,但这会改变函数名的含义。
【判断题】
在Python中可以使用if作为变量名。
【判断题】
在Python 3.x中可以使用中文作为变量名。
【判断题】
Python变量名必须以字母或下划线开头,并且区分字母大小写。
【判断题】
加法运算符可以用来连接字符串并生成新字符串。
【判断题】
9999**9999这样的命令在Python中无法运行。
【判断题】
3+4j不是合法的Python表达式。
【判断题】
Python 2.x和Python 3.x中input()函数的返回值都是字符串。
【判断题】
pip命令也支持扩展名为.whl的文件直接安装Python扩展库。
【判断题】
只有Python扩展库才需要导入以后才能使用其中的对象,Python标准库不需要导入即可使用其中的所有对象和方法。
【判断题】
在Python中0xad是合法的十六进制数字表示形式。
【判断题】
3+4j 是合法Python数字类型。
【判断题】
在Python中0oa1是合法的八进制数字表示形式。
【判断题】
Python使用缩进来体现代码之间的逻辑关系。
【判断题】
Python代码的注释只有一种方式,那就是使用#符号。
【判断题】
调用函数时,在实参前面加一个型号*表示序列解包。
【判断题】
放在一对三引号之间的任何内容将被认为是注释。
【判断题】
Python支持使用字典的“键”作为下标来访问字典中的值。
【判断题】
尽管可以使用import语句一次导入任意多个标准库或扩展库,但是仍建议每次只导入一个标准库或扩展库。
【判断题】
为了让代码更加紧凑,编写Python程序时应尽量避免加入空格和空行。
【判断题】
在Python 3.5中运算符+不仅可以实现数值的相加、字符串连接,还可以实现列表、元组的合并和集合的并集运算。
【判断题】
已知x为非空列表,那么表达式 sorted(x, reverse=True) == list(reversed(x)) 的值一定是True。
【判断题】
已知x为非空列表,那么x.sort(reverse=True)和x.reverse()的作用是等价的。
【判断题】
生成器推导式比列表推导式具有更高的效率,推荐使用。
【判断题】
Python字典中的“键”不允许重复。
【判断题】
Python字典中的“值”不允许重复。
【判断题】
Python字典中的“键”可以是列表。
推荐试题
【判断题】
朱自清的《给亡妇》具有明显的絮语散文的特点。
【判断题】
《清忠谱》和《桃花扇》集明清传奇之大成。
【判断题】
《定风波》(莫听穿林打叶声)体现了苏轼旷达的词风。
【单选题】
With increased taxation and rising prices, I am going to have to __________ on quite a lot of things – clothes, records and so on.___
A. cut off
B. cut in
C. cut out
D. cut down
【单选题】
Have a cup of tea, _______?___
A. shall we
B. will you
C. won't you
D. do you
【单选题】
There is very ___ hope that she will pass the exam.___
A. few
B. small
C. much
D. little
【单选题】
I am not sure whether we can give the right advice _____emergency.___
A. on account of
B. in case of
C. at the risk of
D. in spite of
【单选题】
In their letter to the students’ representative assembly, the freshmen insisted on __________ in the Student Union.___
A. represented
B. being represented
C. having represented
D. have been represented
【单选题】
Nobody noticed the thief slip into the house because the lights happened to _____.___
A. be put up
B. give in
C. be turned on
D. go out
【单选题】
----- John, may I ask you a favour? ----- _________
A. I’m sorry, but why?
B. Sure,what is it?
C. Yes,you could.
D. I’d love to,and I’m busy.
【单选题】
The two thieves fled the town separately, _______ a bag.___
A. each carrying
B. whose that watch is
C. whose watch is that
D. whose watch is
【单选题】
Her heart _____ faster when she entered the exam hall.___
A. jumped
B. sank
C. beat
D. hit
【单选题】
The taxi driver was put in_____prison because his car had knocked down a child.His wife went to_____ prison to see him twice a month.___
A. /; /
B. the; the
C. /; the
D. the; /
【单选题】
----- Where’s John, do you know? ----- Oh, _____to hospital.___
A. he’s taken
B. he’ll be taken
C. he’s been taken
D. he’ll take
【单选题】
It was the wealth of the_____pioneer landowner John Harvard that made Harvard University possible.___
A. precious
B. curious
C. anxious
D. prosperous
【单选题】
----- "Where is your college located, John?" ----- "It is ________."___
A. on the Fifth Avenue
B. on Fifth Avenue
C. in Fifth Avenue
D. at Fifth Avenue
【单选题】
__________ is she in London than she rings up her old friend Mary.___
A. Scarcely
B. Rarely
C. No sooner
D. Hardly
【单选题】
A fireman discovered the __________ of the fire.___
A. truth
B. reason
C. cause
D. fact
【单选题】
he weather __________ us from climbing the mountain.___
A. discharged
B. disguised
C. disturbed
D. discouraged
【单选题】
I didn't expect to receive a postcard from you!It's really _____my wildest imagination.___
A. behind
B. beyond
C. except
D. through
【单选题】
John Smith is _____ honest young man.___
【单选题】
She __________ in wearing that old – fashioned hat.___
A. insists
B. persists
C. assists
D. consists
【单选题】
Some of the meat came from Canada. How about________?___
A. another
B. the other
C. others
D. the rest
【单选题】
I have brought you ___ flowers for your birthday. ___
A. few
B. a few
C. little
D. a little
【单选题】
I have also experienced many adventures, but nothing that I have seen ___what you have described. ___
A. compares
B. relates
C. resembles
D. assembles
【单选题】
That young man has made so much noise that he ___ not have been allowed attend the concert. ___
A. could
B. must
C. would
D. should
【单选题】
“What is Mary doing at home?” “She is playing ____.”___
A. a piano
B. her piano
C. piano
D. the piano
【单选题】
I’m busy now ,ask him to see me ____ time.___
A. the other
B. some other
C. other
D. another
【单选题】
The child took a spoonful and tasted it carefully __________ it was hot.___
A. in case
B. provided
C. if
D. unless
【单选题】
The French pianist who had been praised very highly __________ to be a great disappointment. ___
A. turned off
B. turned up
C. turned out
D. turned down
【单选题】
“Shall I turn on the television?” – “No, I’d rather not __________ television tonight.”___
A. have watched
B. to watch
C. watch
D. for watching
【单选题】
They said that they had made up their minds to ____the task in spite of the extremely difficult conditions.___
A. carry on
B. carry off
C. carry away
D. carry forward
【单选题】
The two girls are getting on very well and share with each other. ___
A. little
B. much
C. some
D. none
【单选题】
The teacher said that the classroom was empty __________ a few chairs.___
A. but for
B. except for
C. apart from
D. besides
【单选题】
______you choose, make sure that it is a good one. ___
A. What
B. Wherever
C. Whichever
D. Which
【单选题】
Vingo was released from prison_____the successful efforts of his friends to prove his innocence. ___
A. according to
B. as a result of
C. for reasons of
D. with the help of
【单选题】
Entering the room, I found my father __ at the desk and ___ something .___
A. seat... write
B. seated ... wrote
C. seated ... writing
D. seating ... writing
【单选题】
Cake __________ of flour, sugar, egg and some other ingredients. ___
A. contained
B. consists
C. includes
D. composed
【单选题】
Mr. Peter wanted Steve to take half the money, but Steve did not __________ it. ___
A. obtain
B. achieve
C. accept
D. receive