give an example of multiple assignments
Answers
Answered by
5
Answer:
An assignment statement gives a value to a variable. For example, x = 5; ... the variable may be a simple name, or an indexed location in an array, or a field (instance variable) of an object, or a static field of a class; and. the expression must result in a value that is compatible with the type of the variable
Answered by
0
Python is very versatile with assignments
- Assigning same value to multiple variables. You can assign same value to multiple variable in a single statement. a= b=c =10.
- Assigning multiple values to multiple variables. You can even assign milti values to multiple variables in single statement . x,y, z = 10, 20, 30
Similar questions