George Chan's Blog

My notes on Python and C++, import this.

Tuesday, April 3, 2012

Python: How to print the ValueError Error Message

try:
    ...
except ValueError as e:
    print(e)

Posted by George Chan at 4:27 PM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2013 (1)
    • ►  June (1)
  • ▼  2012 (31)
    • ►  May (5)
    • ▼  April (10)
      • Python: How to insert characters to the string at ...
      • Python: How to find the integer and float in a string
      • Python: How to search a list of class element by t...
      • Python: How to remove, or pop an element randomly ...
      • Python: When NOT To use Global Variable, Use Return!
      • Python: How to print the ValueError Error Message
      • Python Tkinter: How to set the window size without...
      • Python: [] vs. {} vs. ()
      • Python: Regular Expression 101 Example Code
      • Python: Calculate Grade Point Average In a 4.0 Scale
    • ►  March (9)
    • ►  February (3)
    • ►  January (4)
  • ►  2011 (2)
    • ►  March (2)
  • ►  2010 (7)
    • ►  December (5)
    • ►  November (2)

Useful Link

  • Hunter Blackboard

Syntax Highlighter

Use this to wrap around the codes
pre class=”brush: js"

Total Pageviews

Watermark theme. Powered by Blogger.