From a4527c5111feb062ccffee9eb8211ff80072e35e Mon Sep 17 00:00:00 2001 From: Michael Warkentin Date: Sat, 8 Jan 2011 16:05:09 -0500 Subject: [PATCH] added extra credit - comments --- ex8.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ex8.py b/ex8.py index 7e73f6b..3464796 100644 --- a/ex8.py +++ b/ex8.py @@ -1,12 +1,20 @@ +# create a variable called formatter, which is a string made of 4 formatting characters formatter = "%r %r %r %r" +# prints formatter with 4 digits print formatter % (1, 2, 3, 4) +# prints formatter with 4 strings print formatter % ("one", "two", "three", "four") +# prints formatter with 4 Booleans print formatter % (True, False, False, True) +# prints formatter with itself, 4 times print formatter % (formatter, formatter, formatter, formatter) +# prints formatter with 4 strings print formatter % ( "I had this thing.", "That you could type up right.", "But it didn't sing.", "So I said goodnight." -) \ No newline at end of file +) + +# It uses both double and single quotes because one of the lines has an apostrophe in it \ No newline at end of file