About 41,300 results
Open links in new tab
  1. python - What does the name of the ord() function stand for?

    May 13, 2018 · The official Python documentation explains ord(c) ord(c): Given a string representing one Unicode character, return an integer representing the Unicode code point of …

  2. python - How to get the ASCII value of a character - Stack Overflow

    Oct 19, 2023 · for code in map(ord, mystr): you convert to Python native types that iterate the codes directly. On Python 3, it's trivial: for code in mystr.encode('ascii'): and on Python 2.6/2.7, …

  3. What is the opposite of python's ord () function? - Stack Overflow

    Apr 23, 2015 · For example, ord('a') returns the integer 97, ord(u'\u2020') returns 8224. This is the inverse of chr() for 8-bit strings and of unichr() for unicode objects. If a unicode argument is …

  4. python - functionality of function ord() - Stack Overflow

    May 1, 2020 · ord is a function that takes a character and returns the number that unicode associates that character with. The way unicode structures the digits 0-9 ord("9")-ord("0") will …

  5. Caesar Cipher Function in Python - Stack Overflow

    Feb 23, 2015 · The Python Standard Library defines a function maketrans() and a method translate that operates on strings. The function maketrans() creates translation tables that can …

  6. python - using ord function (ord(B[0]) - ord('0')) - Stack Overflow

    Feb 15, 2014 · So ord(B[0]) - ord('0') is the int 1 when B[0] is the string '1', and it is the int 0 when B[0] is the string '0'. In short, it is just a way to convert the string to an int. int(B[0]) would have …

  7. Convert alphabet letters to number in Python - Stack Overflow

    Dec 31, 2010 · Everything here is pretty standard, simple Python. The one thing to note is the ord function. ord stand for ordinal, and pretty much every high level language will have this type of …

  8. What is the meaning of ord in ord() function in Python?

    Oct 24, 2022 · From the python docs for ord() Given a string representing one Unicode character, return an integer representing the Unicode code point of that character... This is the inverse of …

  9. Differences of the ord() function between Python 2.7 and 3.9

    Jul 16, 2021 · I checked both documentation, but couldn't identify any difference in versions: ord() in Python 2 and ord() in Python 3. In addition, I searched other sources, but I didn't find any …

  10. ord function in python2.7 and python 3.4 are different?

    Aug 23, 2016 · Traceback (most recent call last): File "udpTransfer.py", line 38, in <module> buf.append(ord(c)) TypeError: ord() expected string of length 1, but int found When I look in …

Refresh