1. Home
  2. Data Science
  3. Python
  4. What does the / in a function signature def f(a, /, b)…

Added 25 Nov 2026

What does the / in a function signature def f(a, /, b) mean in Python?

  1. Parameters before it are keyword-only
  2. It is integer division
  3. Parameters before it are positional-only Correct answer
  4. It is a comment

Correct answer

C. Parameters before it are positional-only

6 views

MCQSEXAM

Explanation

PEP 570 uses / to mark positional-only parameters (Python 3.8+).

Reference

Asked in: Python Interview Functions

https://docs.python.org/3/tutorial/controlflow.html#defining-functions

Preparing for an exam?

Doubts & discussion

Not sure why the answer is C? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs