Online Programming Server

Login

Login with facebook [?]

Facebook

Tutorial 69: CSCI1040 - Lecture 2: Strings, Lists, Functions, Classes

You are here: Tutorials >> Basic >> Python >> Hands-on Introduction to Python >> CSCI1040 - Lecture 2: Strings, Lists, Functions, Classes

Tutorial ID69
TitleCSCI1040 - Lecture 2: Strings, Lists, Functions, Classes

Strings

  • Enclosed either by single quote ‘ or double quote “
>>> 'doesn\'t‘
 "doesn't"
>>> "doesn't"
"doesn't"
>>> '"Yes," \nhe said.' "Yes," \nhe said.‘
>>> print '"Yes," \nhe said.’ "Yes,"
he said.
>>> "\"Yes,\" he said.“
 '"Yes," he said.'
>>> '"Isn\'t," she said.'
'"Isn\'t," she said.'

Post Your Comment

Title
Message