import sys
sys.float_info.max



import sys
sys.float_info.min



c1 = 1 + 2j
c2 = 3 + 4j
c3 = c1 + c2
print(c3)
print(c3.real)
print(c3.imag)



Number.MAX_SAFE_INTEGER + 1 === Number.MAX_SAFE_INTEGER + 2;



x = 1n;
typeof(x);
y = BigInt(2);
typeof(y);



BigInt(Number.MAX_SAFE_INTEGER) + 1n === BigInt(Number.MAX_SAF
E_INTEGER) + 2n;



1 + 2n;



1 + True

1 + true;



not(not([]))
not(not({}))

!![];
!!{};



1 + None



let x;
console.log(x);



typeof(null);
typeof(undefined);



null == undefined;
null === undefined;



1 + null;
1 + undefined;



x = '何かの文字列';
x = "何かの文字列";



s = "abc"
s.find("b")
s.index("b")
s.find("z")
s.index("z")



s = "abc"
s.replace("a", "b").replace("b", "a")



s = "abc"
s.translate(str.maketrans({'a': 'b', 'b': 'a'}))



x = "Kawasaki"
f"{x} is a football club."



f"{1 + 2} is a football club."



"{} is a {}.".format("Kawasaki", "football club")

"{0} is a {1}.".format("Kawasaki", "football club")

"{s} is a {t}.".format(s="Kawasaki", t="football club")



"%s is a %s." % ("Kawasaki", "football club")



s = "Kawasaki";
t = "football club";
`${s} is a ${t}.`;



`${1 + 2} is a ${t}.`;



"""a
b"""



`a
b`;



x = [1, 2, 3]

x = [1, 2, 3];



x = [1, "abc"]

x = [1, "abc"];



x[1]

x[1];



x[10]



x[10];



list(filter(lambda v: v > 2, x))



x = [1, 2, 3, 4]
over_two = lambda v: v > 2
filtered_object = filter(over_two, x)
new_list = list(filtered_object)



over_two = lambda v: v > 2



x.filter(v => v > 2)



x = [1, 2, 3, 4];
overTwo = v => v > 2;
x.filter(overTwo);



[v * 2 for v in x]



"-".join(["a", "b", "c"])



["a", "b", "c"].join("-");



x = [2, 1, 3]
x.sort()
x



x = [2, 1, 3]
y = sorted(x)
y
x



x = [2, 1, 3]
x.sort(reverse=True)
x



x = ["ab", "c", "def"]
x.sort(key=len)
x



from operator import itemgetter
x = [[1, 3], [10, 2], [100, 1]]
x.sort(key=itemgetter(1))
x



from operator import itemgetter
x = [[1, 2], [10, 2], [100, 1]]
x.sort(key=itemgetter(1, 0))
x



from operator import attrgetter
players.sort(key=attrgetter("age"))



from operator import attrgetter
players.sort(key=attrgetter("age", "score"))



x = [3, 2, 1];
x.sort();



x = [100, 11, 1];
x.sort();



x = [100, 11, 1];
x.sort((a, b) => a - b);



x = [100, 11, 1];
x.sort((a, b) => b - a);



x = {};
x["a"] = 1;
x;
x["a"];



x["z"] # KeyError: 'z'

x["z"];
x.z;



x = {};
x.a = 1;
x;
x.a;



a = 1;
b = 2;
x = { a, b };



x = { a: a, b: b };



x = new Set([1, 2, 3]);
x.add(10);
x.add(1);



x = {1, 2, 3}
x.add(10)
len(x)
x
x.add(10)
len(x)
x



x = ("グー", "チョキ", "パー") 
x[0]



freezedArray = Object.freeze(["グー", "チョキ", "パー"]);
freezedArray.push("グーグー");



r = range(0, 10)
5 in r
0 in r
10 in r
list(r)



r = range(0, 10, 2)
list(r)
5 in r



r = range(0, -10, -2)
list(r)






