GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • w3resource
  • Front End
  • HTML
  • CSS
  • JavaScript
  • HTML5
  • Schema.org
  • php.js
  • Twitter Bootstrap
  • Responsive Web Design tutorial
  • Zurb Foundation 3 tutorials
  • Pure CSS
  • HTML5 Canvas
  • JavaScript Course

This view

  • Original page
  • New address

GeezerVison is showing www.w3resource.com — Python: Print Unicode characters - w3resource

Python: Print Unicode characters

Last update on May 17 2025 05:43:14 (UTC/GMT +8 hours)


Print Unicode Characters

Write a Python program to print Unicode characters.

Sample Solution:

Python Code:

# Create a Unicode string by specifying each character's Unicode escape sequence.
str = u'\u0050\u0079\u0074\u0068\u006f\u006e \u0045\u0078\u0065\u0072\u0063\u0069\u0073\u0065\u0073 \u002d \u0077\u0033\u0072\u0065\u0073\u006f\u0075\u0072\u0063\u0065'

# Print a blank line for separation.
print()

# Print the Unicode string, which will be displayed as "Python Exercises - w3resource".
print(str)

# Print another blank line for separation.
print()

Sample Output:

Python Exercises - w3resource

Flowchart:

Flowchart: Print Unicode characters.


For more Practice: Solve these Related Problems:

  • Write a Python program to print a Unicode character given its code point.
  • Write a Python program to convert a Unicode character to its hexadecimal representation.
  • Write a Python program to find and print all Unicode characters in a given range.
  • Write a Python program to replace non-ASCII characters in a string with their closest ASCII equivalent.

Go to:

  • Python Basic Exercises Home ↩
  • Python Exercises Home ↩

Previous: Write a Python program to compute the product of a list of integers (without using for loop).
Next: Write a Python program to prove that two string variables of same value point same memory location.

Python Code Editor:

 

What is the difficulty level of this exercise?

Test your Programming skills with w3resource's quiz.



Follow us on Facebook and Twitter for latest update.


  • Daily Coding Challenges & Projects
  • Weekly Trends and Language Statistics



You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.