About 358,000 results
Open links in new tab
  1. ascii() in Python - GeeksforGeeks

    Apr 26, 2025 · Python ascii() function returns a string containing a printable representation of an object and escapes the non-ASCII characters in the string using \x, \u or \U escapes. It's a …

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

    Oct 19, 2023 · To get the ASCII code of a character, you can use the ord() function. Here is an example code: value = input("Your value here: ") list=[ord(ch) for ch in value] print(list) Output: …

  3. Creating ASCII Text in Python: A Step-by-Step Guide

    Jan 7, 2024 · In this article, we have explored various techniques for creating ASCII text in Python. From using built-in functions like ord() and chr() to leveraging the ascii_art library, …

  4. How to Convert a String to ASCII in Python? - Python Guides

    Jan 23, 2025 · In Python, we can use the built-in ord() function to convert a single character to its corresponding ASCII value. For example, let’s say we have a string containing a person’s …

  5. string — Common string operations — Python 3.13.3 …

    4 days ago · String of ASCII characters which are considered printable by Python. This is a combination of digits, ascii_letters, punctuation, and whitespace. By design, …

  6. Python ascii() (With Examples) - Programiz

    The ascii() method replaces a non-printable character with its corresponding ascii value and returns it. In this tutorial, you will learn about the Python ascii() method with the help of examples.

  7. ascii () | Python’s Built-in Functions – Real Python

    The built-in ascii() function returns a string containing a printable representation of an object, with non-ASCII characters escaped using \x, \u, or \U escapes. This function is useful for …

  8. Python ASCII: Unraveling the Basics, Usage, and Best Practices

    Mar 25, 2025 · In Python, you can use the built-in ord() function to convert a single character to its ASCII value. To convert an ASCII value back to a character, you can use the chr() function. …

  9. Python ascii() Function - W3Schools

    The ascii() function returns a readable version of any object (Strings, Tuples, Lists, etc). The ascii() function will replace any non-ascii characters with escape characters: å will be replaced …

  10. python - Print full ascii art - Stack Overflow

    May 13, 2014 · In Python 3.12.0. Either print(r""" """) or print(r''' ''') prints the ASCII art without any error. space after r""" or r''' is crucial and before r""" or r''' is also crucial to print the ASCII art in …

Refresh