Question PRG-PY-0059
MediumWhat does the walrus operator := do in Python 3.8+?
- A.
Compares two values
- B.
Assigns a value inside an expression, as in while (line := f.readline()):
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Python question
What does the walrus operator := do in Python 3.8+?
Compares two values
Assigns a value inside an expression, as in while (line := f.readline()):
Sign up free to see the answer and a step-by-step explanation.
Declares a constant
Swaps two variables