[Tutor] taking input for a list in a list

surya k suryak at live.com
Mon Sep 26 14:46:00 CEST 2011


Hi,

Actually my programming language is C.. learning python.

I'm trying to write sudoku program for which I need to take input.
This is what I did merely

*list = []
for i in range (0,4) :
      for j in range (0,4) :
           list[i][j].append (" int (raw_input("Enter") ) )

*
This is completely wrong.. but I couldn't handle this kind of.. how do I..
Actually I need a list in a list to handle sudoku.

for a simple list to get input.. this would obviously work..
*list.append ( int(raw_input("Enter") )*


Can you tell me how do I do this correctly ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110926/d8a65700/attachment.html>


More information about the Tutor mailing list