List out the errors in the below code segment and write the correct meaningful expected code
1. Mr.Raghu tried the below given code but he cannot get the sorted output. kindly point out the error in the below code
L=[1,2,”4”,5]
print(L.sort())
answer it fast plsssss
Answers
Answered by
1
Answer:
since one of the array elements is encoded in double Cotes.( "")
Explanation:
the array elements all should be without double Cotes since doubles Cotes are used for a group of character represented as a group which is string ......
MARK ME AS THE BRAINLIEST
&
FOLLOW ME...
Answered by
1
The item "4" is responsible for the error.
The data type of all the elements in the list need to be the same to use the sort() method on the list.
Similar questions