![]() |
| ||
| List Index Question 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: [code = python]mylist = ["Whatever", "Whatever", "Whatever", "Whatever"][/code] 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. |
| ||
| Re: List Index Question this way mylist = ["whatever"] * 100 |
| ||
| Re: List Index Question Problem solved. Thanks a lot. |
| All times are GMT -4. The time now is 11:12 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC