[Tutor] taking input for a list in a list

Joel Goldstick joel.goldstick at gmail.com
Mon Sep 26 15:08:05 CEST 2011


On Mon, Sep 26, 2011 at 8:46 AM, surya k <suryak at live.com> wrote:

> 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 ?
>
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
> because list is a built in data type you should name your list something
else.  What does your code do? does it give traceback errors?  After you
change list to, say my_list what do you get?


-- 
Joel Goldstick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110926/fbf63536/attachment.html>


More information about the Tutor mailing list