Use multiple assignment to set x to 10 and y to 20 on one line
A medium Python mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.
- Domain
- Python
- Difficulty
- medium
Interview Prompt
Use multiple assignment to set x to 10 and y to 20 on one line. Then swap their values using Python's one-line swap (no temp variable). Print x and y separated by a space.
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write your python solution with real code execution
- Get instant feedback and a hire/no-hire decision