About 115,000 results
Open links in new tab
  1. How do I reverse a string in Python? - Stack Overflow

    There is no built in reverse method for Python's str object. How can I reverse a string?

  2. python - How do I reverse a list or loop over it backwards? - Stack ...

    How do I iterate over a list in reverse in Python? See also: How can I get a reversed copy of a list (avoid a separate statement when chaining a method after .reverse)?

  3. Why does Python return None on list.reverse()? - Stack Overflow

    Nov 20, 2020 · 5 list.reverse reverses in place, modifying the list it was called on. Generally, Python methods that operate in place don’t return what they operated on to avoid confusion over whether …

  4. python - list.reverse () is not working - Stack Overflow

    Oct 10, 2013 · 6 list.reverse() reverses the list in place. It doesn't return the reversed list. For that, use reversed() function:

  5. python - Sort a list in reverse order - Stack Overflow

    Apr 16, 2017 · sorted is a built-in function that order your str element with an alphabetical algorithm, rather than just for reverse your sequence. Use help(sorted) in your kernal to see the details.

  6. Print a list in reverse order with range ()? - Stack Overflow

    Sep 2, 2011 · Using "reversed" with python generator (assuming we ware talking of Python 3 range built-in) is just conceptually wrong and teaches wrong habits of not considering memory/processing …

  7. Python reverse() for palindromes - Stack Overflow

    Dec 19, 2016 · 19 Try y = x[::-1]. This uses splicing to get the reverse of the string. reversed(x) returns an iterator for looping over the characters in the string in reverse order, not a string you can directly …

  8. Python reversing a string using recursion - Stack Overflow

    Additionally, Python imposes a limit on stack size, and there's no tail call optimization, so a recursive solution would be limited to reversing strings of only about a thousand characters. You can increase …

  9. django - What is reverse ()? - Stack Overflow

    Jun 28, 2012 · Existing answers did a great job at explaining the what of this reverse() function in Django. However, I'd hoped that my answer shed a different light at the why: why use reverse() in …

  10. what's the inverse of the quantile function on a pandas Series?

    Oct 21, 2014 · 1 You can use the ECDF function from statsmodels. ECDF stands for empirical distribution function, "empirical" referring to the fact that the function it's creating is based on what is …