How to write a list / dictionary type of Python3

About the type

#List type
  sampleA = [[name,"Sato"],[age,1]], [[name,"Mori"],[age,20]]

#Dictionary type
  sampleB = {"apple":1, "orange":2}

#Examine the type
  type(sampleA)
  type(sampleB)

#List type to Key/Extract Value
  for index, value in enumerate(sampleA)

#From dictionary type to Key/Extract Value
  for index, value in items(sampleA)

Recommended Posts

How to write a list / dictionary type of Python3
How to get dictionary type elements of Python 2.7
How to write a Python class
[Python] How to make a list of character strings character by character
How to shuffle a part of a Python list (at random.shuffle)
How to get a list of built-in exceptions in python
[Python] How to convert a 2D list to a 1D list
Summary of how to use Python list
How to check the memory size of a dictionary in Python
[Python] How to use two types of type ()
How to clear tuples in a list (Python)
[Python] How to use list 1
[Python] How to put any number of standard inputs in a list
[Introduction to Python] How to sort the contents of a list efficiently with list sort
How to format a list of dictionaries (or instances) well in Python
Summary of Python sort (list, dictionary type, Series, DataFrame)
[Python] How to write a docstring that conforms to PEP8
How to pass the execution result of a shell command in a list in Python
How to get a list of files in the same directory with python
[Python] How to create a dictionary type list, add / change / delete elements, and extract with a for statement
[Python] How to use list 3 Added
Offline real-time how to write Python implementation example of E14
How to convert an array to a dictionary with Python [Application]
How to develop in a virtual environment of Python [Memo]
How to display a list of installable versions with pyenv
How to get the last (last) value in a list in Python
Python: Create a dictionary from a list of keys and values
How to write a metaclass that supports both python2 and python3
How to get a list of links from a page from wikipedia
How to connect the contents of a list into a string
Get the value of a specific key in a list from the dictionary type in the list with Python
How to check in Python if one of the elements of a list is in another list
How to determine the existence of a selenium element in Python
[Python] How to force a method of a subclass to do something specific
Qiita (1) How to write a code name
[Python] How to make a class iterable
Try to get a list of breaking news threads in Python.
[Django] Convert QuerySet to dictionary type list
Display a list of alphabets in Python 3
How to write Python document comments (Docstrings)
Get the value of a specific key up to the specified index in the dictionary list in Python
Offline real-time how to write Python implementation example of E15 problem
I tried to create a list of prime numbers with python
[Python] How to invert a character string
[Python] How to delete rows and columns in a table (list of drop method options)
How to get a stacktrace in python
[Python2.7] Summary of how to use unittest
[python] Get a list of instance variables
[python] [meta] Is the type of python a type?
[Introduction to Udemy Python3 + Application] 24. Dictionary type
[Python] How to create a table from list (basic operation of table creation / change of matrix name)
[Python2.7] Summary of how to use subprocess
How to remove duplicates from a Python list while preserving order.
How to delete multiple specified positions (indexes) in a Python list
[Introduction to Udemy Python3 + Application] 16. List type
[Python] Get a list of folders only
[Python] How to make a matrix of repeating patterns (repmat / tile)
How to write Ruby to_s in Python
Summary of how to write AWS Lambda
How to run a Maya Python script
How to pass the execution result of a shell command in a list in Python (non-blocking version)