// [C++] String Concatenation // VC : suppress error messages about obsolete & deprecated functions#pragma warning(disable : 4996)#define _CRT_SECURE_NO_WARNINGS#define _CRT_SECURE_NO_WARNINGS_GLOBALS #include #include using namespace std; int main(){ // string text0 = "Hello" + "World"; // error string text1 = "Hello" "World"; cout
# immutable def func(x): print("x", hex(id(x)), x) x += 1 print("x", hex(id(x)), x) def main(): a = 1 print("a", hex(id(a)), a) func(a) print("a", hex(id(a)), a) if __name__ == '__main__': main() """ Outputa 0x67298070 1x 0x67298070 1x 0x67298090 2a 0x67298070 1""" # mutable def func(x): print("x", hex(id(x)), x) x.append(3) print("x", hex(id(x)), x) def main(): a = [1, 2] print("a", hex(id(a)),..
# Python for .NET import syssys.path.append("..\\Sharp1\\bin\\Debug") import clrclr.AddReference("Forms1") import Forms1import Systemimport System.Windows.Formsfrom PyQt5.QtWidgets import * class pyForm1(Forms1.Form1): def __init__(self): self.Text = "Python for .NET" self.button1.Click += self.pybutton1_Click self.button2.Click += self.pybutton2_Click def pybutton1_Click(self, sender, e): self...