Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # plural.py
- # add an 's' to indicate plural when k is not 1
- for k in range(1, 4):
- print "This loop ran %d time%s" % (k, 's'*(k != 1))
- """
- The for loop ran 1 time
- The for loop ran 2 times
- The for loop ran 3 times
- """
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement