Quick actions

cmd+k|ctrl+k

Navigation

Languages

L4

Snippet info

Language

Python

Visibility

public

Author

tmmymy375

Created

2025-02-19T11:15:01.68898Z

Updated

2025-02-19T13:50:16.911182Z

#__init__ # internal system variable

#__init # class internal variable

#Person # class type

#Apple - class
#apples - group of apple
#apple - single

x = 1 + 1
x = 2
y = 2
print(id(x),id(y))


names = ["john", 1, [1,2,3], "ryan", ["david",1,2] ,[1,"peter", [4,5], [6,7]]]
print(names[5][3][0])
print(names[3][0])

head = 3

man = {head : 'big',
       3 : 2,
       "body" : 1.5,
       "leg" : 'long' }

man['face'] = 'round'
print(man)
del man['body']
print(man)

man ["face"] = [{'eyes' : 2}, 'nose', {'ears' : 2}]
print(man["face"][2]["ears"])
print("Hello \nWorld")

for key, value in man["face"][0].items():
    print(key)
INFO