Home > other >  python
python

Time:10-11

I don't quite understand the meaning of this line of code
Brothers and sisters
Can help me and explain


I think should be in the input nums traversal, parallel to the array, but I write wrong again in another way,

CodePudding user response:

The
refer to the original poster weixin_44968084 response:
I don't quite understand the meaning of this line of code
Brothers and sisters
Can help me and explain


I think should be in the input nums traversal, parallel to the array, but I write wrong again in another way,

I don't understand this code, the interpreter also don't understand that

CodePudding user response:

Look not to understand... The input,

CodePudding user response:

Is your input several separated by a space, then put these hundreds of Spaces for the delimiter is placed into a list

CodePudding user response:

reference 1st floor JMZL response:
Quote: refer to the original poster weixin_44968084 response:
I don't quite understand the meaning of this line of code
Brothers and sisters
Can help me and explain


I think should be in the input nums traversal, parallel to the array, but I write wrong again in another way,

I don't understand this code, the interpreter does not understand the kind of

My major is not clear that the book code meaning

CodePudding user response:

refer to the second floor rain catalpa hao response:
look not to understand... The input,,

My major is not clear the book code of the rain

CodePudding user response:

reference 4 floor weixin_44968084 response:
Quote: reference 1st floor JMZL response:
Quote: refer to the original poster weixin_44968084 response:
I don't quite understand the meaning of this line of code
Brothers and sisters
Can help me and explain


I think should be in the input nums traversal, parallel to the array, but I write wrong again in another way,

I don't understand this code, the interpreter does not understand the kind of

I mostly don't know the meaning of the code in the book

You this is a grammar mistakes? A is the int class, cannot vector generation

CodePudding user response:

Not clear what exactly do you want to ask what, ten people I understand below, can help you,
The meaning of the book is separated by Spaces you input data into a pure number list, input the returned is a string (you enter 1 2 3 4 - & gt; '1, 2, 3, 4'), the split is the API of the string, use STR. The split (separator), the default is a space delimiter, the separator to use quotation marks, is obtained by the API is a list of [' 1 ', '2', '3'], and then through the for loop iterates through each element, to transform it into an int type, the result was a list of [1, 2, 3, 4]
You wrote, int (input ()), it can only accept a single pure digital, or transfer of type int, for is for object iterative list of strings, dictionary, range (n), etc., and gain knowledge of a single element, and sort () is a list of the API, to rise sort the elements in the list, probably is this, hope for your help, rookie passing

CodePudding user response:

look from your description, you don't have to clear up the usage of the input function,

The above code is input Numbers 2, 3, 4, 5 and 6, return a string, and then call the string of the split method, returns a list of instance,