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
Nesta página do site você pode assistir ao vídeo on-line Python Developer: Python Variables - Assign Multiple Values | Tutorial 6 duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Professional Skill 2023 02 Setembro 2025, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 41 vezes e gostou 3 espectadores. Boa visualização!