Câu 25: PCPP-32-101: Certified Professional in Python Programming 1
Select the true statements related to PEP 8 programming recommendations for code writing. (Choose two.)
Nội dung câu hỏi
Select the true statements related to PEP 8 programming recommendations for code writing. (Choose two.)
Các lựa chọn
Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.
- A. You should use the not ... is operator (e.g. if not spam is None:), rather than the is not operator (e.g. if spam is not None:), to increase readability.
- B. You should make object type comparisons using the isinstance() method (e.g. if isinstance(obj , int):) instead of comparing types directly (e.g. if type(obj) is type(1)). — đáp án hiện tại
- C. You should write code in a way that favors the CPython implementation over PyPy, Cython, and Jython.
- D. You should not write string literals that rely on significant trailing whitespaces, as they may be visually indistinguishable, and certain editors may trim them. — đáp án hiện tại
Cộng đồng
0 bình luận công khai. Tên thành viên được ẩn một phần.
Chưa có bình luận. Mở giao diện tương tác để bắt đầu thảo luận.