About 141,000 results
Open links in new tab
  1. String comparison in Python: is vs. == - Stack Overflow

    String comparison in Python: is vs. == [duplicate] Asked 15 years, 4 months ago Modified 8 years, 10 months ago Viewed 1.2m times

  2. python - How are strings compared? - Stack Overflow

    I'm wondering how Python does string comparison, more specifically how it determines the outcome when a less than < or greater than > operator is used. For instance if I put print ('abc' …

  3. python - How do I do a case-insensitive string comparison

    How can I compare strings in a case insensitive way in Python? I would like to encapsulate comparison of a regular strings to a repository string, using simple and Pythonic code.

  4. python - Why does comparing strings using either '==' or 'is' …

    Two string variables are set to the same value. s1 == s2 always returns True, but s1 is s2 sometimes returns False. If I open my Python interpreter and do the same is comparison, it …

  5. How do I compare version numbers in Python? - Stack Overflow

    Aug 9, 2012 · It is used by pip, and other common Python tools to provide version parsing and comparison. $ pip install packaging from packaging.version import parse as parse_version …

  6. python - Find the similarity metric between two strings - Stack …

    How do I get the probability of a string being similar to another string in Python? I want to get a decimal value like 0.9 (meaning 90%) etc. Preferably with standard Python and library. e.g. si...

  7. Comparing two date strings in Python - Stack Overflow

    Dec 4, 2013 · Let's say I have a string: "10/12/13" and "10/15/13", how can I convert them into date objects so that I can compare the dates? For example to see which date is before or after.

  8. python - Fuzzy String Comparison - Stack Overflow

    Apr 30, 2012 · I am unsure which operation to use to allow me to complete this in Python 3. I have included the sample text in which the Text 1 is the original and the other preceding strings are …

  9. Why is string comparison so fast in python? - Stack Overflow

    The string comparison in binarySearch is presumably optimized by the interpreter / CPU behind the scenes. charByChar actually creates new strings for each character accessed and this …

  10. Comparing a string to multiple items in Python - Stack Overflow

    Aug 6, 2013 · I'm trying to compare a string called facility to multiple possible strings to test if it is valid. The valid strings are: auth, authpriv, daemon, cron, ftp, lpr, kern, mail, news, syslog, …