100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

Python exam review questions and answers

Rating
-
Sold
-
Pages
15
Grade
A+
Uploaded on
15-11-2025
Written in
2025/2026

Python exam review questions and answers What are 4 commands provided by shutil? - ANSWERS-copyfile, copy, copytree, rmtree What is the symlinks argument? - ANSWERS-An argument for copytree, decides whether to copy symbolic links or actual files How do you save things with pickle? - ANSWERS-pkl = pickle.Pickler(file); (something), () How do you load pickled information? - ANSWERS-(file) How do you shelve a file? - ANSWERS-(file) What does CGI stand for? - ANSWERS-common gateway interface How do you open a URL? - ANSWERS-en(url) How do you define a class? - ANSWERS-class Class: how do we add a list to a list? - ANSWERS-list[2] = [1, 2, 3] how do we ad elements of a list to a list? - ANSWERS-list[2:2] = [1,2,3]

Show more Read less
Institution
Python
Course
Python









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Python
Course
Python

Document information

Uploaded on
November 15, 2025
Number of pages
15
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

Python exam review questions and
answers15

What are 4 commands provided by shutil? - ANSWERS-copyfile, copy, copytree, rmtree



What is the symlinks argument? - ANSWERS-An argument for copytree, decides whether to
copy symbolic links or actual files



How do you save things with pickle? - ANSWERS-pkl = pickle.Pickler(file); pkl.dump(something),
file.close()



How do you load pickled information? - ANSWERS-pickle.load(file)



How do you shelve a file? - ANSWERS-shelve.open(file)



What does CGI stand for? - ANSWERS-common gateway interface



How do you open a URL? - ANSWERS-urllib.request.urlopen(url)



How do you define a class? - ANSWERS-class Class:



how do we add a list to a list? - ANSWERS-list[2] = [1, 2, 3]



how do we ad elements of a list to a list? - ANSWERS-list[2:2] = [1,2,3]

, how do we delete elements from a list? - ANSWERS-del list[1]



what's another way of deleting elements from a list, besides del? - ANSWERS-list[1] = []



what does 3 * [0] return? - ANSWERS-[0,0,0]



if you really want to copy a list, what can you do? - ANSWERS-list2 = list1[:]



difference between append and extend? - ANSWERS-append adds whole argument as single
element, while extend adds each item of argument as element



how to insert exactly one element? - ANSWERS-list.insert(position, element)



what does remove do to a list? - ANSWERS-removes first element in list with given value



what does list.sort() do? - ANSWERS-



what does list.index() do? - ANSWERS-



what does list.count() do? - ANSWERS-



what does dict.get(key) return if the key exists? - ANSWERS-the value of the key



what does dict.get(key) return if the key does not exist? - ANSWERS-None



what kind of objects do dictionary methods return? - ANSWERS-view

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Bensuda Oxford University
View profile
Follow You need to be logged in order to follow users or courses
Sold
829
Member since
3 year
Number of followers
445
Documents
20738
Last sold
15 hours ago
ECONOMICS,NURSING,BIOLOGY AND ALL REVISION MATERIALS

DEDICATED TO PROVIDE YOU WITH THE BEST LEARNING MATERIALS THAT WILL IMPROVE YOUR GRADES ,WELCOME TO ALIZGRADES AND LETS DO IT TOGETHER!!! GOODLUCK!!!!!!!

3.7

156 reviews

5
72
4
24
3
25
2
11
1
24

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions