Variables Questions and Answers
Python Programming - Variables Questions with Answers help understand how data is stored and referenced in Python. These Python Variables Questions are key for Infosys, Accenture, and SSC exams testing programming basics and naming conventions
Variables
Showing 10 of
24 questions
21. Which of these is a valid way to assign multiple variables in one line?
- a, b, c = 1, 2, 3
- a = b = c = 1
- a = 1; b = 2; c = 3
- All of the above
22. What does the += operator do?
- Addition only
- Assignment only
- Addition and assignment
- Comparison
23. How do you make a variable available inside a function without passing it as parameter?
- global keyword
- local keyword
- import keyword
- extern keyword