Reputation: 0 Apprentice
- New Members
- Active Posts:
- 3 (0.01 per day)
- 22-November 12
- Profile Views:
- Last Active:
- Nov 23 2012 09:35 AM
- Dream Kudos:
Posts I've Made
Posted 22 Nov 2012Fixed the problem in another forum
After reading n, i inserted
a = [ [ '~' for _ in range(n) ] for _ in range(n) ]
HalleluyahHello! I had a look at your program and this seems to be the problem:
When you are trying to create the matrix you are not actually populating a at all! It will be empty!
But you mean to set :
a[i][j] = "~"
Do you understand what I mean? Also, a is not a 2 dimensional array, it's a 1 dimensional structure at the moment. If you need more help fixing it we'd be happy to help.
Didn't see your post, you must've posted a few seconds before me.
It's so simple now, that I know the answer, I'm almost ashamed now. Thank you anyway!!
Posted 22 Nov 2012Thanks for your fast answer.
But I'm afraid this doesn't solve my problem.
The problem is
IndexError: list index out of range
If that helps you find my problem
- Member Title:
- New D.I.C Head
- Age Unknown
- Birthday Unknown
- Click here to e-mail me
Khantan hasn't added any friends yet.