Click here to Skip to main content
15,904,822 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Can we take list inside the list concept like this Or if want to get alphabet G then Printf(Alphabets [2][0]) Or if want to get the total sublist 2 then Print(Alphabets [2]) Is it correct or wrong sir


What I have tried:

<pre>Can we take list inside the list concept like this Or if want to get alphabet G then Printf(Alphabets [2][0]) Or if want to get the total sublist 2 then Print(Alphabets [2]) Is it correct or wrong sir
Posted
Updated 31-Oct-21 22:34pm
Comments
OriginalGriff 1-Nov-21 3:22am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
Use the "Improve question" widget to edit your question and provide better information.

1 solution

Do you mean something like:
Python
alphabet = [['A','B','C','D'],['E','F','G']]
print(alphabet[1][2])

or this
Python
alphabet = ['abcdefg','hijklmn']
print(alphabet[1][2])
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900