📜  在python代码示例中将一个变量拆分为多个变量

📅  最后修改于: 2022-03-11 14:45:04.374000             🧑  作者: Mango

代码示例1
variable = "Hello, my name, is, ect"

#The seperate varibles ("a,b,c,d")     
a, b, c, d = variable.split(",") # What we are splitting the variable with (",") 

print(f"{a} \n {b} \n{c} \n{d}")
# Our output would be:
'''
Hello
my name
is
ect
'''