Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

append multiple values to 2d list python

gradebook = [["physics", 98], ["calculus", 97], ["poetry", 85], 
             ["history", 88]]
print(gradebook)

# now append other values that you wish to add
gradebook.append(["computer science", 100])
print(gradebook)
Comment

PREVIOUS NEXT
Code Example
Python :: django filter by category 
Python :: len in python 
Python :: python recursion factorial 
Python :: create virtual env pyhton3 
Python :: how to add createsuper user in django 
Python :: python access each group 
Python :: raw input example py 
Python :: python select last item in list 
Python :: Modify a Python interpreter 
Python :: pygame surface 
Python :: pyqt5 plain text edit get text 
Python :: Jinja for items in list 
Python :: delimiter pandas 
Python :: python list deep copy 
Python :: python __repr__ 
Python :: remove all na from series 
Python :: python escape character example 
Python :: python random number generator no duplicates 
Python :: balancing paranthesis python 
Python :: python read input 
Python :: format dictionary python 
Python :: pytorch cuda tensor in module 
Python :: get column index pandas 
Python :: installing python3.9 on linux mint 20 
Python :: max between two numbers python 
Python :: divide all values in array python 
Python :: beautifulsoup 
Python :: python working with files and dirs 
Python :: Delete file in python Using the shutil module 
Python :: how to find the longest string python 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =