Tag:tuple

  • Python built-in data structures list, set, dict and tuple (III)

    Time:2021-10-16

    Functions on tuples Here’s the code The following functions are basically applicable to list #Len: get the length of the tuple t = (1,2,3,4,5) len(t) 5 #Max, Min: maximum and minimum print(max(t)) print(min(t)) 5 1 #Tuple: convert or create tuples l = (1,2,3,4,5) t = tuple(l) print(t) t = tuple() print(t) (1, 2, 3, 4, […]

  • Talking big about Python: consolidating the foundation of Python — counting the data structure of Python

    Time:2021-9-29

    Generally speaking, in Python language, data types can be divided into two categories according to whether data types are variable or not. One is variable data type and the other is immutable data type. Whether the data type is changeable refers to whether the data object can be modified directly, not whether the object can […]

  • Pre machine learning (III): master common numpy usage in 30 minutes

    Time:2021-9-29

    Numpy supports a large number of dimensional array and matrix operations. It is a python library for array operations. This article is included inMachine learning pre tutorial series。 1、 Python Basics Let’s first consolidate the basics of Python. Python has six standard data types: number, string,List(list), tuple, set, dictionary.Of which:Immutable data: number, string, tuple.Variable data: […]

  • Fundamentals of Python: Python’s data structure

    Time:2021-9-26

    brief introduction Whether doing scientific computing or writing applications, we need to use some basic data structures, such as lists, tuples, dictionaries and so on. This article will explain these basic data structures in Python in detail. list A list is a list, which can be expressed in square brackets: In [40]: ages = [ […]

  • Rust programming video tutorial (Advanced) – 024_ 2 syntax of all modes 2

    Time:2021-9-18

    Video address Headline address:https://www.ixigua.com/i677586170644791348…Station B address:https://www.bilibili.com/video/av81202308/ Source address GitHub address:https://github.com/anonymousGiga/learn_rus… Explanation content 1. Match byExample 1: let x = 5; match x { 1..=5 => println! (“one through five”), // that is, the range from 1 to 5 is matched _ => println!(“something else”), } Note: in the example, 1.. = 5 is equivalent to […]

  • Trust reading notes basics 1

    Time:2021-9-17

    Trust noun and cargo Nouns in trust Code package: Crites Original identifier:I don’t understand What is the difference between macros and functions in trust? The difference between the macro of trust and the form of function call, macro band! Function calls do not have; Cargo in trust Cargo new project name: creates a new project, […]

  • Sorting of Python related data structures

    Time:2021-9-10

    By Luay matalkaCompile VKSource: towards Data Science In this tutorial, we will learn how to sort iteratable containers such as lists, tuples, strings, and dictionaries according to different criteria. Sort list There are two ways to sort a list. We can use the sort () method or the sorted () function. The sort () method […]

  • Gaussdb for DWS: summary of memory adaptive control technology

    Time:2021-8-29

    1. Technical background In the AP scenario with complex SQL statements and a large amount of data, a single query has an increasing demand for memory. The concurrency of multiple statements can easily eat up the memory of the system, resulting in the problem of insufficient memory. In order to deal with this problem, gaussdb […]

  • Xiaobai Xue data analysis SQL daily practice

    Time:2021-8-24

    background Recently, I plan to learn a little about data analysis. Although there are a lot of advertising components in the figure below, many technologies do not pressure me. It is said that everyone should have a little product thinking and be sensitive to data. I read the introduction of some training institutions, and there […]

  • Python No.12_ List loop & tuple

    Time:2021-8-20

    1、 List cycle NDD = [1,23,3,34,6, [2,2,3,4], 3] for I in NDD: Print (I) # list to print out strings in turn. For I in NDD [5]: print out the strings in sequence in the print (I) # list. #################################################2、 Tuple names = (‘aaa ‘,’ BBB ‘,’ CCC ‘) # tuples are actually similar to […]

  • Detailed explanation of Python tuple packaging and unpacking process

    Time:2021-8-20

    1. When multiple comma separated values are assigned to a variable, multiple values are packaged into a tuple type. When we assign a tuple to multiple variables, it unpacks into multiple values, and then assigns them to the corresponding variables respectively. #Pack a = 1, 10, 100 print(type(a), a) # <class ‘tuple’> (1, 10, 100) […]

  • [Python learning notes] function parameter transfer method

    Time:2021-8-17

    1. Position transfer def message(name, address): return ‘my name is %s ,my home locate in %s.’ %(name,address) print(message(‘lily’,’shanghai’))Call message to pass Lily and Shanghai to name and address respectively 2. Keyword transfer def message(name, ago, address): return ‘my name is %s ,%s years ago,my home locate in %s.’ %(name, ago, address)Keyword passing, you can ignore […]