Archive for month: April, 2021

[Git] How to checkout release from tag

20 Apr
April 20, 2021

The syntax is

git clone -b 'tag' --single-branch --depth 1

For example

git clone -b master --single-branch
git clone -b gvmd-20.08 --single-branch 

[Python] collections of data

04 Apr
April 4, 2021

1. List items are ordered, changeable, and allow duplicate values.

mylist = ["apple", "banana", "cherry"]

2. Tuple items are ordered, unchangeable, and allow duplicate values.

mytuple = ("apple", "banana", "cherry")

3. Set items are unordered, unchangeable, and do not allow duplicate values.

myset = {"apple", "banana", "cherry"}

4. A dictionary is a collection which is ordered*, changeable and does not allow duplicates.

thisdict = {
  "brand": "Ford",
  "model": "Mustang",
  "year": 1964

Noted: *As of Python version 3.7, dictionaries are ordered. In Python 3.6 and earlier, dictionaries are unordered.

© Copyright - HHGG It's 42