Skip to main content

01 | Try

String literals must be enclosed in double quotes or single quotes as in this example.

This sample code is from Python in Easy Steps. You can access this book for free on the UNC Library with this link: https://ebookcentral.proquest.com/lib/unc/detail.action?docID=7075484

output.py

title = 'Python is Cool!'

try :
print(titel)

except NameError as msg :
print(msg)