menu

Python Input and Output

Python Input and Output - Important Points


16. Which function is used to remove a file in Python?

A. os.remove()

B. os.rename()

C. os.mkdir()

D. D. os.rmdir()

Discuss Work Space

Answer: option a

Explanation:

The os.remove() function is used to remove a file in Python.

17. Which function is used to rename a file in Python?

A. os.rename()

B. os.remove()

C. os.mkdir()

D. D. os.rmdir()

Discuss Work Space

Answer: option a

Explanation:

The os.rename() function is used to rename a file in Python.

18. Which function is used to remove a directory in Python?

A. os.rmdir()

B. os.remove()

C. os.rename()

D. D. os.mkdir()

Discuss Work Space

Answer: option a

Explanation:

The os.rmdir() function is used to remove a directory in Python.

19. Which module is used to work with CSV files in Python?

A. csv

B. os

C. sys

D. D. io

Discuss Work Space

Answer: option a

Explanation:

The csv module is used to work with CSV files in Python.

20. Which function is used to open a CSV file in Python?

A. csv.reader()

B. csv.writer()

C. csv.open()

D. D. csv.read()

Discuss Work Space

Answer: option a

Explanation:

The csv.reader() function is used to open a CSV file in Python.


Subscribe for Latest Career Trends
Subscribe Now
Use AI and ChatGPT for Career Guidance

Unlock Your Future

Join Now
Worried for Placements in 2024?

Join FAST TRACK Course

Join Now
Supercharge Your SUCCESS

Join All in One Placement Mock Tests-2024

Join Now