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 '''
Here is what the above code is Doing:
1. We are creating a variable called “variable” and setting it equal to a string.
2. We are creating 4 new variables (a,b,c,d) and setting them equal to the variable “variable”
3. We are splitting the variable “variable” with the “,”
4. We are printing the new variables (a,b,c,d)