0

First off, I know that to set an indexed variable, say, mylist[3] = "Hello". I also know that you wouldn't be able to set mylist[3] if you didn't first state:

mylist = ["Whatever", "Whatever", "Whatever", "Whatever"]

But, if you had a variable with an extremely large index, it would be a pain in the rear to type " "Whatever", " that many times.

So, my question is, is there a not-tedious way to do this? Like Ruby's mylist = "Whatever" * 100?

Thanks in advance.

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by SoulMazer
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.