@fran496: no, but they're iterable objects that support indices, just like lists - except every element in a string is a single character. This means most of the syntax elements that can be used on lists can be used on strings as well.
except for mutating elements, you can do that with lists but not with strings
Same! TIL
A quick word of thanks - I actively learned from this. I appreciate all of you who put this answer in and helped make my code better. :)
i liked this pin
This comment is hidden because it contains spoiler information about the solution
crazy xD
😳
Here you sort ALL the 50 millions element and after you had to compare the digit (not linear for sur).
But all you have to do is to look element by element and find the first one who is not asc (linear).
Sorry for my english
damn, did the same thing but replaced -1 with len(arr) -1, yours is much simpler lol
Wow.. I made mine way more complicated
This is an excelent use of String Slicing in Python
This comment is hidden because it contains spoiler information about the solution
what is the use of underscore?
i didn't know that range function return a list . nice
@fran496: no, but they're iterable objects that support indices, just like lists - except every element in a string is a single character. This means most of the syntax elements that can be used on lists can be used on strings as well.
except for mutating elements, you can do that with lists but not with strings
the kata specifies you don't have to deal with those
Loading more items...