Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #41696 > unrolled thread
| Started by | bob gailer <bgailer@gmail.com> |
|---|---|
| First post | 2013-03-22 13:31 -0400 |
| Last post | 2013-03-22 13:31 -0400 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [Python-Help] how does the % work? bob gailer <bgailer@gmail.com> - 2013-03-22 13:31 -0400
| From | bob gailer <bgailer@gmail.com> |
|---|---|
| Date | 2013-03-22 13:31 -0400 |
| Subject | Re: [Python-Help] how does the % work? |
| Message-ID | <mailman.3615.1363973983.2939.python-list@python.org> |
It is better to post to just one list at a time.
On 3/22/2013 1:06 PM, leonardo selmi wrote:
> name = raw_input("What is your name?")
> quest = raw_input("What is your quest?")
> color = raw_input("What is your favorite color?")
>
> print """Ah, so your name is %s, your quest is %s,
> and your favorite color is %s.""" % (name, quest, color)
Runs OK for me!
The traceback does not match the code. Please post the code that
actually generated this:
File "/Users/leonardo/print.py", line 5, in <module>
favourite color is %s.''') % (name, quest, color)
TypeError: unsupported operand type(s) for %: 'NoneType' and 'tuple'
--
Bob Gailer
919-636-4239
Chapel Hill NC
Back to top | Article view | comp.lang.python
csiph-web