Python Developer: Python Variables - Assign Multiple Values | Tutorial 6

Published: 02 September 2025
on channel: Professional Skill 2023
41
3

Python Variables - Assign Multiple Values
1-Many Values to Multiple Variables
Python allows you to assign values to multiple variables in one line:
x, y, z = "Orange", "Banana", "Cherry"
2-One Value to Multiple Variables
And you can assign the same value to multiple variables in one line:
x = y = z = "Orange"
3-Unpack a Collection
If you have a collection of values in a list, tuple etc. Python allows you to extract the values into variables. This is called unpacking.
fruits = ["apple", "banana", "cherry"]
x, y, z = fruits


On this page of the site you can watch the video online Python Developer: Python Variables - Assign Multiple Values | Tutorial 6 with a duration of hours minute second in good quality, which was uploaded by the user Professional Skill 2023 02 September 2025, share the link with friends and acquaintances, this video has already been watched 41 times on youtube and it was liked by 3 viewers. Enjoy your viewing!