what is the difference between curly brace and square bracket in python?
A ={1,2} B =[1,2]
when I print A and B o
A
B
They create different types.
>>> type({}) >>> type([]) >>> type({1, 2}) >>> type({1: 2}) >>> type([1, 2])