Tags: cant, comgtescribidid, intend, itags, jul, ltsnezhana, manoah, mon, multiply, non-int, org, programming, python, questionthe, sequence, snezhana, stilog, typeerror
TypeError: can't multiply sequence to non-int
On Programmer » Python
437 words with 0 Comments; publish: Fri, 04 Jan 2008 17:39:00 GMT; (20062.50, « »)
En Mon, 09 Jul 2007 10:12:42 -0300, Snezhana <snezhana.manoah.python.itags.org.stilog.com>
escribi:
?
Did you intend to post any question?
The error is rather explicit: you can't say:
"abc" * 5.2241
[1,2,3] * "Hello"
(4,"z") * None
The right operand must be an integer:
"abc" * 5 (gives "abcabcabcabcabc")
[1,2,3] * 8 (gives a list with 24 numbers)
(4,"z") * 2 (gives (4,"z",4,"z"))
--
Gabriel Genellina
http://python.itags.org/q_python_92345.html
All Comments
Leave a comment...
- 0 Comments