+ 3

Error on Sort function code

I received ERROR from following Code, anyone know what is the problem ? ERROR Screenshot: https://ufile.io/jpb1n Code: https://code.sololearn.com/czS0c7LpL29J/?ref=app

28th Dec 2017, 8:37 PM
NIMA
NIMA - avatar
6 Answers
+ 4
https://code.sololearn.com/cZ03E87cz9Du/?ref=app
28th Dec 2017, 9:59 PM
Tim Thuma
Tim Thuma - avatar
+ 5
As you can see in error message ' In [50]: _is_sorted_sample_("i am nima") ' I can see here that you passed an argument that is a type of string and your code will only work with arguments that type of list. So try passing a different argument like ["i", "am", "nima"] and tell me the output you get.
28th Dec 2017, 9:00 PM
Tim Thuma
Tim Thuma - avatar
+ 4
Maybe just change the name of function, because it's a bit wierd to start a name with underscore. I really have no other ideas. Hope you won't have more problems because I gotta go now, it's late night here.
28th Dec 2017, 9:55 PM
Tim Thuma
Tim Thuma - avatar
+ 1
Could you post the whole code
28th Dec 2017, 7:18 PM
Cailyn Baksh
+ 1
the output of ["i", "am", "nima"] https://ufile.io/5xtlq
28th Dec 2017, 9:23 PM
NIMA
NIMA - avatar
+ 1
Thanks Tim By adding print to the code, ERROR solved but in many functions without print (with only using return) I had no ERROR ...
28th Dec 2017, 10:08 PM
NIMA
NIMA - avatar