Tag:get home

  • Python 3 dictionary merge


    Method 1: >>> a = {“a”: “a”, “b”: “b”} >>> b = {“b”: “b”, “c”: “c”} >>> {**a, **b} {‘a’: ‘a’, ‘b’: ‘b’, ‘c’: ‘c’} Method 2: >>> a = {“a”: “a”, “b”: “b”} >>> b = {“b”: “b”, “c”: “c”} >>> dict(a, **b) {‘a’: ‘a’, ‘b’: ‘b’, ‘c’: ‘c’} Method 3: >>> a = […]

  • Thread communication


    How threads communicate In order to realize the coordination between threads, such as: the execution sequence of threads, obtaining the execution result of a thread, etc., the mutual communication between threads is involved, which is divided into the following four categories File sharing Network sharing Variable sharing The thread coordination API provided by JDK is […]

  • C × do… While loop


    I. Introduction The loop in for and while writes test loop conditions at the head, while the loop in do…. while writes test conditions at the end of the loop The loop of do… While is similar to that of while, but the loop body of do… While is executed at least once. Two. Grammar […]