Split keyword

why we are using this keyword.

If you are talking about this

x, y, z = map(int, input().split())

Here, split() helps you take multiple inputs in the same line having some equal amount of spaces between them. It divides them into parts based on the space between the entered value.
For example, you enter 2 3 4 as input, each having 4 spaces between them.
split() splits this as 2 , 3 and 4 taking space as separator.
Then we get:
x=2, y=3 and z=4.

1 Like