# mutable immutable def main(): # List is mutable myList = [1, 2, 3] print(hex(id(myList)), myList) myList.append(4) print(hex(id(myList)), myList) # int is immutable myInt = 3 print(hex(id(myInt)), myInt) myInt += 1 print(hex(id(myInt)), myInt) if __name__ == "__main__": main() [Output]0x20fd3e84508 [1, 2, 3]0x20fd3e84508 [1, 2, 3, 4]0x55ce80b0 30x55ce80d0 4
# Python1.py import programimport source def main(): print("in Python1.py", __name__) program.main() source.main() if __name__ == "__main__": main() # program.py def main(): print("in program.py", __name__) if __name__ == "__main__": main() # source.py def main(): print("in source.py", __name__) if __name__ == "__main__": main()
[Python] is operator, is not operatorhttps://www.geeksforgeeks.org/difference-operator-python/ [C#] is operator, as operatorhttps://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/ishttps://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/ashttps://www.geeksforgeeks.org/c-sharp-is-operator-keyword/https://www.geeksforgeeks.org/c-sharp-as-operator-keyword/http..