plural data type comparison of javascript and python



自分の内部に複数のデータを含めることができるdatatypeは、上図に太字で表示されている青いdatatypeかもしれません.
もしそうであれば、複数のデータを含む代表名があり、その代表名の下のメンバーを指す方法が必要です.
https://stackoverflow.com/questions/21770910/python-data-structure-literals

Javascript


https://boycoding.tistory.com/4
https://developer.mozilla.org/ko/docs/Web/JavaScript/Data_structures

Property accessors


https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Operators/Property_Accessors
https://velog.io/@kim-jaemin420/Object-literal%EA%B0%9D%EC%B2%B4-%EB%A6%AC%ED%84%B0%EB%9F%B4#5-%ED%94%84%EB%A1%9C%ED%8D%BC%ED%8B%B0-%EC%A0%91%EA%B7%BC
const person1 = {};
person1['firstname'] = 'Mario';
person1['lastname'] = 'Rossi';

console.log(person1.firstname);
// expected output: "Mario"

const person2 = {
  firstname: 'John',
  lastname: 'Doe'
};

console.log(person2['lastname']);
// expected output: "Doe"
var card={スーツ:「愛」rank:「A」};
Property名は文字列で置換できます.
var card={“sut”:“heart”,“rank”:“A”};
card.セット
card["rank"] //-> A

Python


https://www.geeksforgeeks.org/python-data-types/
https://www.w3schools.com/python/python_datatypes.asp

list

thislist = ["apple", "banana", "cherry"]
print(thislist[1])

tuple

thistuple = ("apple", "banana", "cherry")
print(thistuple[-1])

dict

thisdict =	{
  "brand": "Ford",
  "model": "Mustang",
  "year": 1964
}
print(thisdict["model"])

set

thisset = {"apple", "banana", "cherry"}
print(thisset)

class/object

class Person:
  def __init__(self, name, age):
    self.name = name
    self.age = age

p1 = Person("John", 36)

print(p1.name)
print(p1.age)